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
DNS: | |
178.22.122.100 | |
185.51.200.2 | |
----------------------- | |
sudo apt install software-properties-common | |
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup | |
sudo echo "deb http://http.kali.org/kali kali-rolling main non-free contrib" | sudo tee /etc/apt/sources.list | |
sudo apt update |
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
#1- Create `Media` Model In App\Models | |
<?php | |
namespace App\Models; | |
use Spatie\MediaLibrary\HasMedia; | |
use Illuminate\Database\Eloquent\Model; | |
use Spatie\MediaLibrary\InteractsWithMedia; |
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
@echo off | |
color 0A | |
title laravel task cronjob for windows © Er.DhruvMishra | |
Echo. | |
echo Drag n Drop the artisan file of your project here | |
echo (it is located in your project folder) | |
set /p ap= | |
cls | |
:starx | |
SCHTASKS /Create /SC MINUTE /TN laravel /TR "php %ap% schedule:run" |
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 | |
YourModel::updateOrCreate( | |
[ | |
'user_id' => '1', | |
'user_type' => 'admin' | |
], | |
[ | |
'user_id' => '1', | |
'user_type' => 'admin', | |
'value' => DB::raw('value + 1'), |
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
/* | |
* Laravel Route Or Controller | |
*/ | |
Route::post('tinymce-upload', function (Request $request) { | |
#Check For Upload (add your security !!!) | |
$fileName = request()->file('file')->getClientOriginalName(); | |
$path = request()->file('file')->storeAs('uploads', $fileName, 'public'); | |
return response()->json(['location' => "/storage/$path"]); |
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 | |
class Debug { | |
/** | |
* A collapse icon, using in the dump_var function to allow collapsing | |
* an array or object | |
* | |
* @var string | |
*/ |
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
/* | |
** saeed abdollahian | |
** Freelance PHP developer & consultant. Laravel specialist. | |
** Freelance (available) | |
** https://t.me/PhpWebDeveloper | |
*/ | |
<?php | |
namespace App; | |
/* |
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
{"lastUpload":"2020-08-04T03:52:57.654Z","extensionVersion":"v3.4.3"} |
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 | |
$to_store ='test-file.png'; | |
$img_data=null; | |
$fontSize = 20; | |
$imgWidth = 400; | |
$imgHeight = 80; | |
$angle = 0; | |
$font = 'font_name.ttf'; |
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
by: https://github.com/saeedvir | |
telegram : https://t.me/PhpWebDeveloper | |
============================================== | |
package : | |
https://github.com/spatie/laravel-medialibrary | |
("proc_open" function is disabled in shared host) | |
use this code in your model : |