Sual: Laravel-də request gəldikdə ilk hansı fayl işləyir?
Cavab:
public/index.php
faylı ilk işləyir. Buradan bootstrap/app.php
çağrılır və application bootstrap olunur. Sonra kernel (App\Http\Kernel
) işləyir, middleware-lər işə düşür, routing icra olunur və controller cavabı response-a çevrilərək geri qaytarılır.
This file contains hidden or 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 | |
if (!function_exists('get_model_by_table')) { | |
function get_model_by_table($table): \Illuminate\Support\Collection | |
{ | |
$models = collect(); | |
if (\Illuminate\Support\Facades\File::isDirectory(app_path('Models'))) { | |
$model_files = array_filter(\Illuminate\Support\Facades\File::allFiles(app_path('Models')), function ($file) { | |
return $file->getExtension() === 'php'; | |
}); |
This file contains hidden or 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
<script type="text/javascript"> | |
$.ajaxSetup({ | |
headers: { | |
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | |
} | |
}); | |
$('form').on('submit',function(e){ | |
e.preventDefault(); | |
$.ajax({ |
This file contains hidden or 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 | |
$path = base_path('.env'); | |
$test = file_get_contents($path); | |
if (file_exists($path)) { | |
file_put_contents($path, str_replace('APP_ENV=local', 'APP_ENV=production', $test)); | |
} |
This file contains hidden or 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
<script type="text/javascript"> | |
$(document).ready(function(e) { | |
$.ajaxSetup({ | |
headers: { | |
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | |
} | |
}); | |
$('#image').change(function() { | |
let reader = new FileReader(); | |
reader.onload = (e) => { |
This file contains hidden or 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
function contentCopy(input,title){ | |
var r = document.createRange(); | |
r.selectNode(document.getElementById(input)); | |
window.getSelection().removeAllRanges(); | |
window.getSelection().addRange(r); | |
document.execCommand('copy'); | |
window.getSelection().removeAllRanges(); | |
toastr['success']( '@lang("Copied to clipboard!")',title); // optional bonus | |
} |
<select id="customer_ids" name="customer_ids[]" class="selectpicker show-tick " title="Select" required multiple data-actions-box="true" data-live-search="true" data-width="100%" data-container="body" data-style="bg-white border" data-selected-text-format="count">
<option value="1" selected data-tooltip="long text 1" data-content="<i class='fas fa-info-circle'></i> short text 1..." >icon short text 1... </option>
<option value="2" selected data-tooltip="long text 2" data-content="<i class='fas fa-info-circle'></i> short text 2..." >icon short text 2... </option>
</select>
This file contains hidden or 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 | |
if (!function_exists('staticMailTemplateReplace')) { | |
function staticMailTemplateReplace($scope, object $data = NULL) | |
{ | |
$templates = Cache::get('templates', function () { | |
return (new Template())->on('mysql_license')->get(); | |
}); | |
$template_options = Cache::get('template_options', function () { |
This file contains hidden or 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
yum install epel-release | |
yum install libmcrypt libmcrypt-devel | |
for version in $(ls /opt/cpanel|grep ea-php); do /opt/cpanel/${version}/root/usr/bin/pecl channel-update pecl.php.net; done | |
export LC_ALL="C" | |
export LANG="C" | |
/opt/cpanel/ea-php72/root/usr/bin/pecl install channel://pecl.php.net/mcrypt-1.0.1 | |
/opt/cpanel/ea-php73/root/usr/bin/pecl install channel://pecl.php.net/mcrypt-1.0.2 | |
/opt/cpanel/ea-php74/root/usr/bin/pecl install channel://pecl.php.net/mcrypt-1.0.3 |
NewerOlder