Laravel

From Network Security Wiki
Revision as of 15:20, 1 September 2017 by Amanjosan2008 (talk | contribs) (Created page with "= Installation = sudo apt install composer laravel new blog composer create-project --prefer-dist laravel/laravel blog cp .env.example .env php artisan key:generate...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Installation

sudo apt install composer
laravel new blog
composer create-project --prefer-dist laravel/laravel blog
cp .env.example .env
php artisan key:generate
php artisan serve --host 0.0.0.0 --port 8082


Site Creation

        This section is under construction.

Enable Authentication

php artisan make:auth
access denied error
.env
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret
create database homestead;
grant all privileges on homestead.* to homestead@localhost identified by 'secret';
php artisan make:migration create_links_table --create=blog
cd database/migrations/
sudo nano 2017_08_31_184008_create_links_table.php
Schema::create('blog', function (Blueprint $table) {
     $table->increments('id');
     $table->string('title');
     $table->string('url’)->unique();
     $table->text('description');
     $table->timestamps();
});