Laravel pagination problem when deleting last item

when deleting the last record on pagination page , this will make that page be fully empty with no records ... this snippet will allow you to redirect to the main route when deleting the last record on pagination and the page is empty

وحدات القياس الالكترونية

وحدات القياس الالكترونية مثل الامبير - الوات - الاوم .. الخ

تعريفات مهمه فى الكهرباء

2547 0 0

تعريفات هامه فى كورس الالكترونيات

Eloquent normal sql select statement

In laravel and eloquent, some times you might need to run a normal SQL select statement. So here is an example to do so:

Increase memory size or execution time

In case you wanted to increase memory size or loading or execution time here is this small snippet

Prevent modal from hiding when being clicked outside

Sometimes, when a modal appears you donot want to be hidden if you clicked outside it in the gray area around it in the whole page. to prevent that behavoir, Use the following small code to prevent all modals from this action:

make controller artisan command with parameters

This command creates a new controller file in app/Http/Controllers folder in laravel with all available parameters

BUG FIX: Elasticsearch is not working and closes immediately

I tries re-installing Elasticsearch 6.3.0 on my local server, and installed Java JDK, the most recent one, then when I try to start the Elasticsearch from installation folder/6.3.0/bin/elasticsearch.exe the cmd screen opens and immedietely closes. Here is the error : Unrecognized VM option 'UseConcMarkSweepGC'

Composer update error

If you installed the new composer on php version 7.1, this will show an error like this : Class UpdateHelper\ComposerPlugin contains 2 abstract methods and must therefore be declared abstract or implement the remaining methods (Composer\Plugin\PluginInterface::deactivate, Composer\Plugin\PluginInterface::uninstall) in /var/www/vhosts/ on line 11 Here is a solution to this issue

Automate the process of youtube comments

This script runs in an extension that will automate the process of commenting on any video.