Laravel 5.2 Storage::makeDirectory($dir) is not creating directory

Well… I figured out what was going on. File::exists(public_path() . “/video/$user”) is looking for this: /home/ubuntu/workspace/site/public/video/N And Storage::makeDirectory(public_path() . “/video/$user”) is creating a directory in: /home/ubuntu/workspace/site/storage/app/public/video/N So I can go to site/config/filesystems.php and change the routes for app and app/public ; you can check them by using the helper storage_path(‘app’).But, instead, I decided to save the videos in the storage/app/public/video and storage/app/public/thumbnails, and I am getting some package’s … Read more

Laravel PHP Command Not Found

Ok, I did that and it works: And paste do source ~/.bash_profile and enjoy 😉 Important: If you want to know the difference between bash_profile and bashrc please check this link Note: For Ubuntu 16.04 running laravel 5.1, the path is: ~/.config/composer/vendor/bin On other platforms: To check where your Composer global directory is, run composer global about. Add /vendor/bin to the directory that gets listed after “Changed … Read more

What is Options +FollowSymLinks?

You might try searching the internet for “.htaccess Options not allowed here”. A suggestion I found (using google) is: Check to make sure that your httpd.conf file has AllowOverride All. A .htaccess file that works for me on Mint Linux (placed in the Laravel /public folder): Hope this helps you. Otherwise you could ask a … Read more

When to generate a new Application Key in Laravel?

php artisan key:generate is a command that sets the APP_KEY value in your .env file. By default, this command is run following a composer create-project laravel/laravel command. If you use a version control system like git to manage your project for development, calling git push … will push a copy of your Laravel project to wherever it is going, but will not include your .env file. Therefore, if … Read more

Could not open input file: artisan

When trying to create a new laravel project, The following error appears on the CLI: Could not open input file: artisan Script php artisan clear-compiled handling the post-install-cmd event returned with an error I am using the latest version of XAMPP v3.2.1 with PHP 5.5.15 and with mcrypt enabled (made sure of that by issuing … Read more

How to listen messageSent event in laravel 5.5

You can pass data from the controller to the mailable, and then from the mailable to the listener For example I have a model called SendOrder that I use to keep track the status of the email, so I pass this model from the controller to the listener This is what you have to do from scratch … Read more

laravel updateOrCreate method

In your use case, you should specify a second parameter. The first indicates the conditions for a match and second is used to specify which fields to update. Here is an example from the documentation: https://laravel.com/docs/5.4/eloquent

What Are “npm run dev” and “npm run prod”

They are indeed the scripts as defined in the package.json file as you discovered. The values are run by your shell (so, for example, bash, zsh, etc. on UNIX-like operating systems). One key thing to note is that the node_modules/.bin directory is added to PATH before executing. So, in the case of the two scripts you’re asking about, cross-env can be found in node_modules/.bin (because it’s almost … Read more

tech