Skip to content

Instantly share code, notes, and snippets.

View alixcan's full-sized avatar
💭
I may be slow to respond.

Alican alixcan

💭
I may be slow to respond.
View GitHub Profile
<?php
//dd($request->route());
/*
$routes = [];
foreach (\Route::getRoutes()->getIterator() as $route){
if (strpos($route->uri, 'api') !== false){
$routes[] = $route->uri;
}
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Chrome Develooper Panel Disabled</title>
</head>
<body>
<h1>Osman</h1>
@alixcan
alixcan / RarBgListImages.md
Created April 29, 2018 17:03
RarBg ListImages
@alixcan
alixcan / EloquentCheatSheet.md
Created April 27, 2018 15:02 — forked from avataru/EloquentCheatSheet.md
Eloquent relationships cheat sheet
@alixcan
alixcan / directives.php
Created April 6, 2018 14:21 — forked from kelixlabs/directives.php
Laravel Blade Directive To Set Active Menu Class
<?php
Blade::directive('active', function ($expression) {
return "<?php echo active_url($expression); ?>";
});
@alixcan
alixcan / laravel.js
Created March 30, 2018 00:11 — forked from roNn23/laravel.js
Updated delete-script of Jeffrey Way to work with Laravel 5. And optimized the implementation for the CSRF token.
/*
<a href="posts/2" data-method="delete"> <---- We want to send an HTTP DELETE request
- Or, request confirmation in the process -
<a href="posts/2" data-method="delete" data-confirm="Are you sure?">
Add this to your view:
<script>
window.csrfToken = '<?php echo csrf_token(); ?>';
@alixcan
alixcan / laravel.js
Created March 29, 2018 23:48 — forked from JeffreyWay/laravel.js
Want to send a DELETE request when outside of a form? This will handle the form-creation bits for you dynamically, similar to the Rails implementation. (Requires jQuery, but doesn't have to.) To use, import script, and create a link with the `data-method="DELETE"` attribute.
/*
<a href="posts/2" data-method="delete"> <---- We want to send an HTTP DELETE request
- Or, request confirmation in the process -
<a href="posts/2" data-method="delete" data-confirm="Are you sure?">
*/
(function() {
@alixcan
alixcan / array_combinations.php
Created May 14, 2017 08:23
PHP array combinations
<?php
function combinations($arrays, $i = 0) {
if (!isset($arrays[$i])) {
return array();
}
if ($i == count($arrays) - 1) {
return $arrays[$i];
}
// get combinations from subsequent arrays
@alixcan
alixcan / jquery-cookie.js
Created March 21, 2017 09:19
jquery set coocie