Tagged: Laravel

Adding JS libraries in Laravel

Adding JS libraries in Laravel

Adding a library in Laravel To add with npm the library needs to be included and compiled with Webpack   Here is an example with Moment.js get the package (this will put in a...

0

Laravel Save Form Post

php artisan make:migration tasks in database / migrations / create tasks table – paste in up()  function Schema::create(‘tasks’, function (Blueprint $table) { $table->increments(‘id’); $table->string(‘title’); $table->text(‘body’); $table->timestamps(); }); php artisan make:model Task in class Task...

0

Laravel Deployment on Ec2

You gotta have composer installed cd /home/ec2-user/ sudo curl -sS https://getcomposer.org/installer | php // sudo mv composer.phar /usr/local/bin/composer cd /var/www/html/website-directory // make vendor folder sudo mkdir vendor // change permissions sudo chmod -R 755...

0

Get Url In Laravel

There are a bunch of ways to grab the url in Laravel. Here are a few of the ways I have found. Grab whole Url \URL::current(); //returns http://site.localhost/order/202 Grab just the requested URI \Route::current()->uri...