[$result, $exception] = attempt(function() {
throw new \Exception('hello exception');
});
if ($exception){
// Do something with exception
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Middleware; | |
use Illuminate\Http\Request; | |
use Illuminate\Support\Facades\Log; | |
use Symfony\Component\HttpFoundation\Response; | |
class LogResponseTimeMiddleware | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
{ | |
"api":1, | |
"name":"Random String", | |
"description":"Generates random string", | |
"author":"Semih", | |
"icon":"quote", | |
"tags":"random, string" | |
} | |
**/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// TODO: find js way | |
$.ajaxSetup({ | |
beforeSend: function (xhr) { | |
ajaxLoader.show(); | |
}, | |
complete: function (xhr,status) { | |
ajaxLoader.hide(); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.extend( true, $.fn.dataTable.defaults, { | |
processing: true, | |
serverSide: true, | |
ajax: { | |
url: '', | |
type: 'POST' | |
}, | |
aLengthMenu: [[15, 25, 50, 75, -1], [15, 25, 50, 75, 'Tümü']], | |
iDisplayLength: 15, | |
lengthChange: true, |