Top Menu

Nwidart wrote a nice package for laravel where you can easily add video in your system. In this tutorial, I will use Laravel videoable pacakge. Install Install Via Composer Just execute follow command to download the package. composer require nwidart/laravel-videoable Next add the following service provider in config/app.php. 'providers' => [ Nwidart\LaravelVideoable\LaravelVideoableServiceProvider::class, ], Now publish your package. php artisan vendor:publish…

Are you faceing Class App\Repositories\... does not exist in Laravel suddenly? If so, this post might help you to solve this issue. Go to composer.json and add following line there- "autoload": { "classmap": [ "database", "app/Repositories" ], Now, the final things that you need to do, open command line and execute- composer dump-autoload Now try, hope will work perfectly.

Are you big fan of PHP Carbon library? Do you want to make your VueJS time stamp like Carbon formate? For example, a time stamp that show human readable by showing how many minutes / hours ago. In this case, you can do it simply wrting a drective in your vueJS. Lets do that. Here, we need to use a…

Notify is one of the best choose to show your instant notification to your user. However, in many casese, people has question that how to use the Options in notify.js. Here is the skelton that how to use option of notify.js. $.notify("Here its working fine. ", { className:'info', clickToHide: false, autoHide: false, globalPosition: 'top right' }); You can add more…

Need to install node.js and NPM in your Mac? Of course you can install manually but I prefer you to install via Homebrew. Let's do it. Open your mac terminal and write follows- ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" It will take few minutes to complete that. ****If you are experienced that You have not agreed to the Xcode license., than…

Laravel retrieve records

Sometimes, you nee to feach data for a specific date from database. For example, you have to access all the users those joined in yesterday. In this case, you can use your query like so- $users = User::where('created_at', '>=', Carbon::now()->subDay(1))->get(); Now, if you need top check last 30 days, you can apply like so- $users = User::where('created_at', '>=', Carbon::now()->subDay(30))->get(); All…

php regular expression

There are many website where you can live check your regular expression for PHP. Surely there are many sites. Today I would like to introduce a site regular expression 101 where you can check regular expression for many languages. Here is the link of the site regex101 . Beside this, it will explain you the rules and regulations about Regular…

If you are planningf for cities and countries in laravel, I believe the best way is to use laravel citites instead of doing that mannualy. Let's see, how to do that. Install with Composer... composer require ijeffro/laravel-cities dev-master Now run composer update to get all the update. Let's add in app/config/app.php and add the provider and filter 'providers' => […

Display Loading Image While Page Loads with jQuery

If you need to create a loading image while page loads with some other object, than can follow this tips. Right after you tage, add following div. <div class="loader"></div> Now add this style- .loader { position: fixed; left: 0px; top: 0px; width: 100%; height: 100%; z-index: 9999; background: url('images/page-loader.gif') 50% 50% no-repeat rgb(249,249,249); } Finally add following script in your…

Close