{"id":1267,"date":"2016-12-27T08:09:28","date_gmt":"2016-12-27T08:09:28","guid":{"rendered":"http:\/\/myprojects.advchaweb.com\/?p=1267"},"modified":"2016-12-29T14:22:10","modified_gmt":"2016-12-29T14:22:10","slug":"laravel-blog","status":"publish","type":"post","link":"https:\/\/myprojects.advchaweb.com\/index.php\/2016\/12\/27\/laravel-blog\/","title":{"rendered":"Laravel Blog"},"content":{"rendered":"<ol>\n<li>Create a new laravel project:\n<pre class=\"lang:default decode:true\">composer create-project --prefer-dist laravel\/laravel laravel-blog-tutorial<\/pre>\n<pre class=\"lang:default decode:true\">teddy@teddy-K43SJ:~\/Documents\/works\/laravel$ composer create-project --prefer-dist laravel\/laravel laravel-blog-tutorial\r\nYou are running composer with xdebug enabled. This has a major impact on runtime performance. See https:\/\/getcomposer.org\/xdebug\r\nInstalling laravel\/laravel (v5.3.16)\r\n  - Installing laravel\/laravel (v5.3.16)\r\n    Loading from cache\r\n\r\nCreated project in laravel-blog-tutorial\r\n&gt; php -r \"file_exists('.env') || copy('.env.example', '.env');\"\r\nLoading composer repositories with package information\r\nUpdating dependencies (including require-dev)\r\n  - Installing vlucas\/phpdotenv (v2.4.0)\r\n    Loading from cache\r\n\r\n  - Installing symfony\/polyfill-mbstring (v1.3.0)\r\n    Loading from cache\r\n\r\n  - Installing symfony\/var-dumper (v3.1.8)\r\n    Downloading: 100%         \r\n\r\n  - Installing symfony\/translation (v3.1.8)\r\n    Downloading: 100%         \r\n\r\n  - Installing symfony\/routing (v3.1.8)\r\n    Downloading: 100%         \r\n\r\n  - Installing symfony\/process (v3.1.8)\r\n    Downloading: 100%         \r\n\r\n  - Installing psr\/log (1.0.2)\r\n    Loading from cache\r\n\r\n  - Installing symfony\/debug (v3.1.8)\r\n    Downloading: 100%         \r\n\r\n  - Installing symfony\/http-foundation (v3.1.8)\r\n    Downloading: 100%         \r\n\r\n  - Installing symfony\/event-dispatcher (v3.2.1)\r\n    Loading from cache\r\n\r\n  - Installing symfony\/http-kernel (v3.1.8)\r\n    Downloading: 100%         \r\n\r\n  - Installing symfony\/finder (v3.1.8)\r\n    Downloading: 100%         \r\n\r\n  - Installing symfony\/console (v3.1.8)\r\n    Downloading: 100%         \r\n\r\n  - Installing swiftmailer\/swiftmailer (v5.4.4)\r\n    Downloading: 100%         \r\n\r\n  - Installing paragonie\/random_compat (v2.0.4)\r\n    Downloading: 100%         \r\n\r\n  - Installing ramsey\/uuid (3.5.2)\r\n    Downloading: 100%         \r\n\r\n  - Installing jakub-onderka\/php-console-color (0.1)\r\n    Loading from cache\r\n\r\n  - Installing jakub-onderka\/php-console-highlighter (v0.3.2)\r\n    Loading from cache\r\n\r\n  - Installing dnoegel\/php-xdg-base-dir (0.1)\r\n    Loading from cache\r\n\r\n  - Installing nikic\/php-parser (v3.0.2)\r\n    Downloading: 100%         \r\n\r\n  - Installing psy\/psysh (v0.8.0)\r\n    Downloading: 100%         \r\n\r\n  - Installing nesbot\/carbon (1.21.0)\r\n    Loading from cache\r\n\r\n  - Installing mtdowling\/cron-expression (v1.1.0)\r\n    Loading from cache\r\n\r\n  - Installing monolog\/monolog (1.22.0)\r\n    Downloading: 100%         \r\n\r\n  - Installing league\/flysystem (1.0.32)\r\n    Loading from cache\r\n\r\n  - Installing symfony\/polyfill-util (v1.3.0)\r\n    Downloading: 100%         \r\n\r\n  - Installing symfony\/polyfill-php56 (v1.3.0)\r\n    Downloading: 100%         \r\n\r\n  - Installing jeremeamia\/superclosure (2.3.0)\r\n    Downloading: 100%         \r\n\r\n  - Installing doctrine\/inflector (v1.1.0)\r\n    Loading from cache\r\n\r\n  - Installing classpreloader\/classpreloader (3.1.0)\r\n    Downloading: 100%         \r\n\r\n  - Installing laravel\/framework (v5.3.28)\r\n    Downloading: 100%         \r\n\r\n  - Installing fzaninotto\/faker (v1.6.0)\r\n    Loading from cache\r\n\r\n  - Installing hamcrest\/hamcrest-php (v1.2.2)\r\n    Loading from cache\r\n\r\n  - Installing mockery\/mockery (0.9.7)\r\n    Downloading: 100%         \r\n\r\n  - Installing symfony\/yaml (v3.2.1)\r\n    Downloading: 100%         \r\n\r\n  - Installing sebastian\/version (2.0.1)\r\n    Loading from cache\r\n\r\n  - Installing sebastian\/resource-operations (1.0.0)\r\n    Loading from cache\r\n\r\n  - Installing sebastian\/recursion-context (2.0.0)\r\n    Downloading: 100%         \r\n\r\n  - Installing sebastian\/object-enumerator (2.0.0)\r\n    Downloading: 100%         \r\n\r\n  - Installing sebastian\/global-state (1.1.1)\r\n    Loading from cache\r\n\r\n  - Installing sebastian\/exporter (2.0.0)\r\n    Downloading: 100%         \r\n\r\n  - Installing sebastian\/environment (2.0.0)\r\n    Downloading: 100%         \r\n\r\n  - Installing sebastian\/diff (1.4.1)\r\n    Loading from cache\r\n\r\n  - Installing sebastian\/comparator (1.2.2)\r\n    Downloading: 100%         \r\n\r\n  - Installing doctrine\/instantiator (1.0.5)\r\n    Loading from cache\r\n\r\n  - Installing phpunit\/php-text-template (1.2.1)\r\n    Loading from cache\r\n\r\n  - Installing phpunit\/phpunit-mock-objects (3.4.3)\r\n    Downloading: 100%         \r\n\r\n  - Installing phpunit\/php-timer (1.0.8)\r\n    Loading from cache\r\n\r\n  - Installing phpunit\/php-file-iterator (1.4.2)\r\n    Downloading: 100%         \r\n\r\n  - Installing sebastian\/code-unit-reverse-lookup (1.0.0)\r\n    Loading from cache\r\n\r\n  - Installing phpunit\/php-token-stream (1.4.9)\r\n    Downloading: 100%         \r\n\r\n  - Installing phpunit\/php-code-coverage (4.0.4)\r\n    Downloading: 100%         \r\n\r\n  - Installing webmozart\/assert (1.2.0)\r\n    Downloading: 100%         \r\n\r\n  - Installing phpdocumentor\/reflection-common (1.0)\r\n    Loading from cache\r\n\r\n  - Installing phpdocumentor\/type-resolver (0.2.1)\r\n    Downloading: 100%         \r\n\r\n  - Installing phpdocumentor\/reflection-docblock (3.1.1)\r\n    Loading from cache\r\n\r\n  - Installing phpspec\/prophecy (v1.6.2)\r\n    Downloading: 100%         \r\n\r\n  - Installing myclabs\/deep-copy (1.5.5)\r\n    Downloading: 100%         \r\n\r\n  - Installing phpunit\/phpunit (5.7.4)\r\n    Downloading: 100%         \r\n\r\n  - Installing symfony\/css-selector (v3.1.8)\r\n    Downloading: 100%         \r\n\r\n  - Installing symfony\/dom-crawler (v3.1.8)\r\n    Downloading: 100%         \r\n\r\nsymfony\/var-dumper suggests installing ext-symfony_debug ()\r\nsymfony\/translation suggests installing symfony\/config ()\r\nsymfony\/routing suggests installing doctrine\/annotations (For using the annotation loader)\r\nsymfony\/routing suggests installing symfony\/config (For using the all-in-one router or any loader)\r\nsymfony\/routing suggests installing symfony\/dependency-injection (For loading routes from a service)\r\nsymfony\/routing suggests installing symfony\/expression-language (For using expression matching)\r\nsymfony\/event-dispatcher suggests installing symfony\/dependency-injection ()\r\nsymfony\/http-kernel suggests installing symfony\/browser-kit ()\r\nsymfony\/http-kernel suggests installing symfony\/class-loader ()\r\nsymfony\/http-kernel suggests installing symfony\/config ()\r\nsymfony\/http-kernel suggests installing symfony\/dependency-injection ()\r\nparagonie\/random_compat suggests installing ext-libsodium (Provides a modern crypto API that can be used to generate random bytes.)\r\nramsey\/uuid suggests installing ircmaxell\/random-lib (Provides RandomLib for use with the RandomLibAdapter)\r\nramsey\/uuid suggests installing ext-libsodium (Provides the PECL libsodium extension for use with the SodiumRandomGenerator)\r\nramsey\/uuid suggests installing ext-uuid (Provides the PECL UUID extension for use with the PeclUuidTimeGenerator and PeclUuidRandomGenerator)\r\nramsey\/uuid suggests installing moontoast\/math (Provides support for converting UUID to 128-bit integer (in string form).)\r\nramsey\/uuid suggests installing ramsey\/uuid-doctrine (Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type.)\r\nramsey\/uuid suggests installing ramsey\/uuid-console (A console application for generating UUIDs with ramsey\/uuid)\r\npsy\/psysh suggests installing ext-pdo-sqlite (The doc command requires SQLite to work.)\r\npsy\/psysh suggests installing hoa\/console (A pure PHP readline implementation. You'll want this if your PHP install doesn't already support readline or libedit.)\r\nmonolog\/monolog suggests installing aws\/aws-sdk-php (Allow sending log messages to AWS services like DynamoDB)\r\nmonolog\/monolog suggests installing doctrine\/couchdb (Allow sending log messages to a CouchDB server)\r\nmonolog\/monolog suggests installing ext-amqp (Allow sending log messages to an AMQP server (1.0+ required))\r\nmonolog\/monolog suggests installing ext-mongo (Allow sending log messages to a MongoDB server)\r\nmonolog\/monolog suggests installing graylog2\/gelf-php (Allow sending log messages to a GrayLog2 server)\r\nmonolog\/monolog suggests installing mongodb\/mongodb (Allow sending log messages to a MongoDB server via PHP Driver)\r\nmonolog\/monolog suggests installing php-amqplib\/php-amqplib (Allow sending log messages to an AMQP server using php-amqplib)\r\nmonolog\/monolog suggests installing php-console\/php-console (Allow sending log messages to Google Chrome)\r\nmonolog\/monolog suggests installing rollbar\/rollbar (Allow sending log messages to Rollbar)\r\nmonolog\/monolog suggests installing ruflin\/elastica (Allow sending log messages to an Elastic Search server)\r\nmonolog\/monolog suggests installing sentry\/sentry (Allow sending log messages to a Sentry server)\r\nleague\/flysystem suggests installing league\/flysystem-aws-s3-v2 (Allows you to use S3 storage with AWS SDK v2)\r\nleague\/flysystem suggests installing league\/flysystem-aws-s3-v3 (Allows you to use S3 storage with AWS SDK v3)\r\nleague\/flysystem suggests installing league\/flysystem-azure (Allows you to use Windows Azure Blob storage)\r\nleague\/flysystem suggests installing league\/flysystem-cached-adapter (Flysystem adapter decorator for metadata caching)\r\nleague\/flysystem suggests installing league\/flysystem-copy (Allows you to use Copy.com storage)\r\nleague\/flysystem suggests installing league\/flysystem-dropbox (Allows you to use Dropbox storage)\r\nleague\/flysystem suggests installing league\/flysystem-eventable-filesystem (Allows you to use EventableFilesystem)\r\nleague\/flysystem suggests installing league\/flysystem-rackspace (Allows you to use Rackspace Cloud Files)\r\nleague\/flysystem suggests installing league\/flysystem-sftp (Allows you to use SFTP server storage via phpseclib)\r\nleague\/flysystem suggests installing league\/flysystem-webdav (Allows you to use WebDAV storage)\r\nleague\/flysystem suggests installing league\/flysystem-ziparchive (Allows you to use ZipArchive adapter)\r\nlaravel\/framework suggests installing aws\/aws-sdk-php (Required to use the SQS queue driver and SES mail driver (~3.0).)\r\nlaravel\/framework suggests installing doctrine\/dbal (Required to rename columns and drop SQLite columns (~2.4).)\r\nlaravel\/framework suggests installing guzzlehttp\/guzzle (Required to use the Mailgun and Mandrill mail drivers and the ping methods on schedules (~5.3|~6.0).)\r\nlaravel\/framework suggests installing league\/flysystem-aws-s3-v3 (Required to use the Flysystem S3 driver (~1.0).)\r\nlaravel\/framework suggests installing league\/flysystem-rackspace (Required to use the Flysystem Rackspace driver (~1.0).)\r\nlaravel\/framework suggests installing pda\/pheanstalk (Required to use the beanstalk queue driver (~3.0).)\r\nlaravel\/framework suggests installing predis\/predis (Required to use the redis cache and queue drivers (~1.0).)\r\nlaravel\/framework suggests installing pusher\/pusher-php-server (Required to use the Pusher broadcast driver (~2.0).)\r\nlaravel\/framework suggests installing symfony\/psr-http-message-bridge (Required to use psr7 bridging features (0.2.*).)\r\nsebastian\/global-state suggests installing ext-uopz (*)\r\nphpunit\/phpunit-mock-objects suggests installing ext-soap (*)\r\nphpunit\/phpunit suggests installing phpunit\/php-invoker (~1.1)\r\nWriting lock file\r\nGenerating autoload files\r\n&gt; Illuminate\\Foundation\\ComposerScripts::postUpdate\r\n&gt; php artisan optimize\r\nGenerating optimized class loader\r\nThe compiled class file has been removed.\r\n&gt; php artisan key:generate\r\nApplication key [base64:rjLfe49t\/UHcv74aIu3XHobSXw23qcKpUranTPa2Das=] set successfully.<\/pre>\n<p>&nbsp;<\/li>\n<li>Download the ready made laravel blog app from <a href=\"https:\/\/github.com\/jacurtis\/laravel-blog-tutorial\" target=\"_blank\">https:\/\/github.com\/jacurtis\/laravel-blog-tutorial<\/a>. It&#8217;s better to donwload in zip file then extract the content in \/works\/laravel\/laravel-blog-tutorial\/ directory. Overwrite the existing files and directories.<\/li>\n<li>Install the laravel component required:\n<pre class=\"lang:default decode:true\">composer install<\/pre>\n<pre class=\"lang:default decode:true \">teddy@teddy-K43SJ:~\/Documents\/works\/laravel\/laravel-blog-tutorial$ composer install\r\nYou are running composer with xdebug enabled. This has a major impact on runtime performance. See https:\/\/getcomposer.org\/xdebug\r\nLoading composer repositories with package information\r\nInstalling dependencies (including require-dev) from lock file\r\n  - Removing myclabs\/deep-copy (1.5.5)\r\n  - Removing phpdocumentor\/type-resolver (0.2.1)\r\n  - Removing phpdocumentor\/reflection-common (1.0)\r\n  - Removing webmozart\/assert (1.2.0)\r\n  - Removing sebastian\/code-unit-reverse-lookup (1.0.0)\r\n  - Removing sebastian\/resource-operations (1.0.0)\r\n  - Removing ramsey\/uuid (3.5.2)\r\n  - Removing sebastian\/object-enumerator (2.0.0)\r\n  - Removing nikic\/php-parser (v3.0.2)\r\n  - Installing nikic\/php-parser (v2.0.1)\r\n    Downloading: 100%         \r\n\r\n  - Removing classpreloader\/classpreloader (3.1.0)\r\n  - Installing classpreloader\/classpreloader (3.0.0)\r\n    Loading from cache\r\n\r\n  - Removing symfony\/polyfill-util (v1.3.0)\r\n  - Installing symfony\/polyfill-util (v1.1.1)\r\n    Loading from cache\r\n\r\n  - Removing symfony\/polyfill-php56 (v1.3.0)\r\n  - Installing symfony\/polyfill-php56 (v1.1.1)\r\n    Loading from cache\r\n\r\n  - Removing jeremeamia\/superclosure (2.3.0)\r\n  - Installing jeremeamia\/superclosure (2.2.0)\r\n    Loading from cache\r\n\r\n  - Removing league\/flysystem (1.0.32)\r\n  - Installing league\/flysystem (1.0.20)\r\n    Downloading: 100%         \r\n\r\n  - Removing psr\/log (1.0.2)\r\n  - Installing psr\/log (1.0.0)\r\n    Loading from cache\r\n\r\n  - Removing monolog\/monolog (1.22.0)\r\n  - Installing monolog\/monolog (1.18.1)\r\n    Downloading: 100%         \r\n\r\n  - Removing paragonie\/random_compat (v2.0.4)\r\n  - Installing paragonie\/random_compat (v1.4.1)\r\n    Loading from cache\r\n\r\n  - Removing symfony\/polyfill-mbstring (v1.3.0)\r\n  - Installing symfony\/polyfill-mbstring (v1.1.1)\r\n    Loading from cache\r\n\r\n  - Removing symfony\/var-dumper (v3.1.8)\r\n  - Installing symfony\/var-dumper (v3.0.3)\r\n    Downloading: 100%         \r\n\r\n  - Removing symfony\/console (v3.1.8)\r\n  - Installing symfony\/console (v3.0.3)\r\n    Downloading: 100%         \r\n\r\n  - Removing psy\/psysh (v0.8.0)\r\n  - Installing psy\/psysh (v0.7.2)\r\n    Loading from cache\r\n\r\n  - Removing swiftmailer\/swiftmailer (v5.4.4)\r\n  - Installing swiftmailer\/swiftmailer (v5.4.1)\r\n    Loading from cache\r\n\r\n  - Removing symfony\/finder (v3.1.8)\r\n  - Installing symfony\/finder (v3.0.3)\r\n    Downloading: 100%         \r\n\r\n  - Removing symfony\/http-foundation (v3.1.8)\r\n  - Installing symfony\/http-foundation (v3.0.3)\r\n    Downloading: 100%         \r\n\r\n  - Removing symfony\/event-dispatcher (v3.2.1)\r\n  - Installing symfony\/event-dispatcher (v3.0.3)\r\n    Downloading: 100%         \r\n\r\n  - Removing symfony\/debug (v3.1.8)\r\n  - Installing symfony\/debug (v3.0.3)\r\n    Downloading: 100%         \r\n\r\n  - Removing symfony\/http-kernel (v3.1.8)\r\n  - Installing symfony\/http-kernel (v3.0.3)\r\n    Downloading: 100%         \r\n\r\n  - Removing symfony\/process (v3.1.8)\r\n  - Installing symfony\/process (v3.0.3)\r\n    Downloading: 100%         \r\n\r\n  - Removing symfony\/routing (v3.1.8)\r\n  - Installing symfony\/routing (v3.0.3)\r\n    Downloading: 100%         \r\n\r\n  - Removing symfony\/translation (v3.1.8)\r\n  - Installing symfony\/translation (v3.0.3)\r\n    Downloading: 100%         \r\n\r\n  - Removing vlucas\/phpdotenv (v2.4.0)\r\n  - Installing vlucas\/phpdotenv (v2.2.0)\r\n    Downloading: 100%         \r\n\r\n  - Removing fzaninotto\/faker (v1.6.0)\r\n  - Installing fzaninotto\/faker (v1.5.0)\r\n    Downloading: 100%         \r\n\r\n  - Removing mockery\/mockery (0.9.7)\r\n  - Installing mockery\/mockery (0.9.4)\r\n    Downloading: 100%         \r\n\r\n  - Removing phpdocumentor\/reflection-docblock (3.1.1)\r\n  - Installing phpdocumentor\/reflection-docblock (2.0.4)\r\n    Downloading: 100%         \r\n\r\n  - Removing phpunit\/php-token-stream (1.4.9)\r\n  - Installing phpunit\/php-token-stream (1.4.8)\r\n    Loading from cache\r\n\r\n  - Removing symfony\/yaml (v3.2.1)\r\n  - Installing symfony\/yaml (v3.0.3)\r\n    Downloading: 100%         \r\n\r\n  - Removing sebastian\/version (2.0.1)\r\n  - Installing sebastian\/version (1.0.6)\r\n    Loading from cache\r\n\r\n  - Removing sebastian\/recursion-context (2.0.0)\r\n  - Installing sebastian\/recursion-context (1.0.2)\r\n    Loading from cache\r\n\r\n  - Removing sebastian\/exporter (2.0.0)\r\n  - Installing sebastian\/exporter (1.2.1)\r\n    Downloading: 100%         \r\n\r\n  - Removing sebastian\/environment (2.0.0)\r\n  - Installing sebastian\/environment (1.3.5)\r\n    Downloading: 100%         \r\n\r\n  - Removing sebastian\/comparator (1.2.2)\r\n  - Installing sebastian\/comparator (1.2.0)\r\n    Loading from cache\r\n\r\n  - Removing phpunit\/phpunit-mock-objects (3.4.3)\r\n  - Installing phpunit\/phpunit-mock-objects (2.3.8)\r\n    Loading from cache\r\n\r\n  - Removing phpunit\/php-timer (1.0.8)\r\n  - Installing phpunit\/php-timer (1.0.7)\r\n    Downloading: 100%         \r\n\r\n  - Removing phpunit\/php-file-iterator (1.4.2)\r\n  - Installing phpunit\/php-file-iterator (1.4.1)\r\n    Loading from cache\r\n\r\n  - Removing phpunit\/php-code-coverage (4.0.4)\r\n  - Installing phpunit\/php-code-coverage (2.2.4)\r\n    Loading from cache\r\n\r\n  - Removing phpspec\/prophecy (v1.6.2)\r\n  - Installing phpspec\/prophecy (v1.6.0)\r\n    Downloading: 100%         \r\n\r\n  - Removing phpunit\/phpunit (5.7.4)\r\n  - Installing phpunit\/phpunit (4.8.24)\r\n    Downloading: 100%         \r\n\r\n  - Removing symfony\/css-selector (v3.1.8)\r\n  - Installing symfony\/css-selector (v3.0.3)\r\n    Downloading: 100%         \r\n\r\n  - Removing symfony\/dom-crawler (v3.1.8)\r\n  - Installing symfony\/dom-crawler (v3.0.3)\r\n    Downloading: 100%         \r\n\r\n  - Installing psr\/http-message (1.0.1)\r\n    Downloading: 100%         \r\n\r\n  - Installing guzzlehttp\/psr7 (1.3.1)\r\n    Downloading: 100%         \r\n\r\n  - Installing intervention\/image (2.3.7)\r\n    Downloading: 100%         \r\n\r\n  - Removing laravel\/framework (v5.3.28)\r\n  - Installing laravel\/framework (v5.2.23)\r\n    Downloading: 100%         \r\n\r\n  - Installing laravelcollective\/html (v5.2.4)\r\n    Downloading: 100%         \r\n\r\n  - Installing ezyang\/htmlpurifier (v4.8.0)\r\n    Downloading: 100%         \r\n\r\n  - Installing mews\/purifier (2.0.6)\r\n    Downloading: 100%         \r\n\r\n  - Installing doctrine\/lexer (v1.0.1)\r\n    Loading from cache\r\n\r\n  - Installing doctrine\/annotations (v1.2.7)\r\n    Loading from cache\r\n\r\n  - Installing doctrine\/cache (v1.6.0)\r\n    Loading from cache\r\n\r\n  - Installing doctrine\/collections (v1.3.0)\r\n    Loading from cache\r\n\r\n  - Installing doctrine\/common (v2.6.1)\r\n    Loading from cache\r\n\r\n  - Installing doctrine\/dbal (v2.5.4)\r\n    Loading from cache\r\n\r\nintervention\/image suggests installing intervention\/imagecache (Caching extension for the Intervention Image library)\r\nmews\/purifier suggests installing laravel\/lumen-framework (To test the Lumen bindings)\r\nGenerating autoload files\r\n&gt; php artisan clear-compiled\r\n&gt; php artisan optimize\r\nGenerating optimized class loader<\/pre>\n<p>&nbsp;<\/li>\n<li>edit .env file and fill the database account (DB name is laravel_blog)<\/li>\n<li>Create authentication scaffolding (login, register, forgot password, etc)\n<pre class=\"lang:default decode:true\">teddy@teddy-K43SJ:~\/Documents\/works\/laravel\/laravel-blog-tutorial$ php artisan make:auth\r\nCreated View: \/home\/teddy\/Documents\/works\/laravel\/laravel-blog-tutorial\/resources\/views\/auth\/login.blade.php\r\nCreated View: \/home\/teddy\/Documents\/works\/laravel\/laravel-blog-tutorial\/resources\/views\/auth\/register.blade.php\r\nCreated View: \/home\/teddy\/Documents\/works\/laravel\/laravel-blog-tutorial\/resources\/views\/auth\/passwords\/email.blade.php\r\nCreated View: \/home\/teddy\/Documents\/works\/laravel\/laravel-blog-tutorial\/resources\/views\/auth\/passwords\/reset.blade.php\r\nCreated View: \/home\/teddy\/Documents\/works\/laravel\/laravel-blog-tutorial\/resources\/views\/auth\/emails\/password.blade.php\r\nCreated View: \/home\/teddy\/Documents\/works\/laravel\/laravel-blog-tutorial\/resources\/views\/layouts\/app.blade.php\r\nCreated View: \/home\/teddy\/Documents\/works\/laravel\/laravel-blog-tutorial\/resources\/views\/home.blade.php\r\nCreated View: \/home\/teddy\/Documents\/works\/laravel\/laravel-blog-tutorial\/resources\/views\/welcome.blade.php\r\nInstalled HomeController.\r\nUpdated Routes File.\r\nAuthentication scaffolding generated successfully!<\/pre>\n<\/li>\n<li>Use &#8216;migration&#8217; to add some new tables into the new database\n<pre class=\"lang:default decode:true\">teddy@teddy-K43SJ:~\/Documents\/works\/laravel\/laravel-blog-tutorial$ php artisan migrate\r\nMigration table created successfully.\r\nMigrated: 2014_10_12_000000_create_users_table\r\nMigrated: 2014_10_12_100000_create_password_resets_table\r\nMigrated: 2016_02_06_175142_create_posts_table\r\nMigrated: 2016_03_20_162017_add_slug_to_users\r\nMigrated: 2016_04_28_021908_create_categories_table\r\nMigrated: 2016_04_28_022255_add_category_id_to_posts\r\nMigrated: 2016_05_30_153615_create_tags_table\r\nMigrated: 2016_05_30_155417_create_post_tag_table\r\nMigrated: 2016_07_16_173641_create_comments_table\r\nMigrated: 2016_08_15_000718_add_image_col_to_posts<\/pre>\n<p>It should be ready to test the website.<\/li>\n<li>Dont forget to set the file permission in \/public\/ directory if we want to upload an image into it\n<pre class=\"lang:default decode:true\">teddy@teddy-K43SJ:~\/Documents\/works\/laravel\/laravel-blog-tutorial$ sudo chmod -R 777 public\/<\/pre>\n<\/li>\n<li>Test the website: http:\/\/localhost:8000\/\n<pre class=\"lang:default decode:true \">teddy@teddy-K43SJ:~\/Documents\/works\/laravel\/laravel-blog-tutorial$ php artisan serve\r\nLaravel development server started on http:\/\/localhost:8000\/<\/pre>\n<p>If i found an error like:<\/p>\n<pre class=\"lang:default decode:true \">RuntimeException in EncryptionServiceProvider.php line 31:\r\nNo supported encrypter found. The cipher and \/ or key length are invalid.<\/pre>\n<p>Just stop the server then generate the new key:<\/p>\n<pre class=\"lang:default decode:true \">teddy@teddy-K43SJ:~\/Documents\/works\/laravel\/laravel-blog-tutorial$ php artisan key:generate<\/pre>\n<p>It&#8217;d create a new key in .env like<\/p>\n<pre class=\"lang:default decode:true \">APP_KEY=SRicGuQPSaDDLOlnYCNvz7F2zdYIhXHQ<\/pre>\n<p>ref: <a href=\"http:\/\/laravel.io\/forum\/08-25-2016-no-supported-encrypter-found-the-cipher-and-or-key-length-are-invalid-when-i-run-keygenerate\" target=\"_blank\">http:\/\/laravel.io\/forum\/08-25-2016-no-supported-encrypter-found-the-cipher-and-or-key-length-are-invalid-when-i-run-keygenerate<\/a>.<br \/>\nThen start the server back. If everything is okay, here is the screen look like:<a href=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/12\/blog-tutorial.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-1270\" src=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/12\/blog-tutorial-1024x416.png\" alt=\"blog-tutorial\" width=\"840\" height=\"341\" srcset=\"https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/12\/blog-tutorial-1024x416.png 1024w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/12\/blog-tutorial-300x122.png 300w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/12\/blog-tutorial-768x312.png 768w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/12\/blog-tutorial-1200x487.png 1200w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/12\/blog-tutorial.png 1352w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a>Sometimes you got an error about the file permission writeable or not like this<\/p>\n<pre class=\"lang:default decode:true \">NotWritableException in Image.php line 143:\r\nCan't write image data to path (\/home\/teddy\/Documents\/works\/laravel\/laravel-blog-tutorial\/public\/images\/1482895274.jpg)<\/pre>\n<p>Then you need to set the file permission in \/public\/ directory to 777<\/p>\n<pre class=\"lang:default decode:true \">teddy@teddy-K43SJ:~\/Documents\/works\/laravel\/laravel-blog-tutorial$ sudo chmod -R 777 public\/<\/pre>\n<p>Explore the Laravel Blog!!! (Add\/edit users, add\/edit posts, categories, tags, comments, send contact, login, register)<br \/>\nIf you have enough time to learn the nitty-gritty about laravel and how to create this blog step by step, then please watch this 47 youtube videos in <a href=\"https:\/\/www.youtube.com\/playlist?list=PLwAKR305CRO-Q90J---jXVzbOd4CDRbVx\" target=\"_blank\">How to Build a Blog with Laravel<\/a>.<\/li>\n<li>NOTES about this app:<br \/>\nThe route file DONT lay in \/routes\/web.app BUT in \/app\/Http\/routes.php. It used Route::group.<\/p>\n<pre class=\"lang:default decode:true \">Route::group(['middleware' =&gt; ['web']], function () {\r\n\t\/\/ Authentication Routes\r\n\tRoute::get('auth\/login', ['as' =&gt; 'login', 'uses' =&gt; 'Auth\\AuthController@getLogin']);\r\n\tRoute::post('auth\/login', 'Auth\\AuthController@postLogin');\r\n\tRoute::get('auth\/logout', ['as' =&gt; 'logout', 'uses' =&gt; 'Auth\\AuthController@getLogout']);\r\n\r\n\t\/\/ Registration Routes\r\n\tRoute::get('auth\/register', 'Auth\\AuthController@getRegister');\r\n\tRoute::post('auth\/register', 'Auth\\AuthController@postRegister');\r\n\r\n\t\/\/ Password Reset Routes\r\n\tRoute::get('password\/reset\/{token?}', 'Auth\\PasswordController@showResetForm');\r\n\tRoute::post('password\/email', 'Auth\\PasswordController@sendResetLinkEmail');\r\n\tRoute::post('password\/reset', 'Auth\\PasswordController@reset');\r\n\r\n\t\/\/ Categories\r\n\tRoute::resource('categories', 'CategoryController', ['except' =&gt; ['create']]);\r\n\tRoute::resource('tags', 'TagController', ['except' =&gt; ['create']]);\r\n\t\r\n\t\/\/ Comments\r\n\tRoute::post('comments\/{post_id}', ['uses' =&gt; 'CommentsController@store', 'as' =&gt; 'comments.store']);\r\n\tRoute::get('comments\/{id}\/edit', ['uses' =&gt; 'CommentsController@edit', 'as' =&gt; 'comments.edit']);\r\n\tRoute::put('comments\/{id}', ['uses' =&gt; 'CommentsController@update', 'as' =&gt; 'comments.update']);\r\n\tRoute::delete('comments\/{id}', ['uses' =&gt; 'CommentsController@destroy', 'as' =&gt; 'comments.destroy']);\r\n\tRoute::get('comments\/{id}\/delete', ['uses' =&gt; 'CommentsController@delete', 'as' =&gt; 'comments.delete']);\r\n\r\n\r\n\tRoute::get('blog\/{slug}', ['as' =&gt; 'blog.single', 'uses' =&gt; 'BlogController@getSingle'])-&gt;where('slug', '[\\w\\d\\-\\_]+');\r\n\tRoute::get('blog', ['uses' =&gt; 'BlogController@getIndex', 'as' =&gt; 'blog.index']);\r\n    Route::get('contact', 'PagesController@getContact');\r\n    Route::post('contact', 'PagesController@postContact');\r\n\tRoute::get('about', 'PagesController@getAbout');\r\n\tRoute::get('\/', 'PagesController@getIndex');\r\n\tRoute::resource('posts', 'PostController');\r\n});\r\n\r\nRoute::group(['middleware' =&gt; 'web'], function () {\r\n    Route::auth();\r\n\r\n    Route::get('\/home', 'HomeController@index');\r\n});<\/pre>\n<p>The route for the root website (\/) is pointing to &#8216;PagesController.php&#8217; in \/app\/Http\/Controllers\/<\/p>\n<pre class=\"lang:default decode:true \">public function getIndex() {\r\n    $posts = Post::orderBy('created_at', 'desc')-&gt;limit(4)-&gt;get();\r\n    return view('pages.welcome')-&gt;withPosts($posts);\r\n}<\/pre>\n<p>The &#8216;Post&#8217; data is retrieved with a help from &#8216;Post&#8217; model in \/app\/Post.php. The data then would be rendered by welcome.blade.php in \/resources\/views\/pages\/<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Create a new laravel project: composer create-project &#8211;prefer-dist laravel\/laravel laravel-blog-tutorial teddy@teddy-K43SJ:~\/Documents\/works\/laravel$ composer create-project &#8211;prefer-dist laravel\/laravel laravel-blog-tutorial You are running composer with xdebug enabled. This has a major impact on runtime performance. See https:\/\/getcomposer.org\/xdebug Installing laravel\/laravel (v5.3.16) &#8211; Installing laravel\/laravel (v5.3.16) Loading from cache Created project in laravel-blog-tutorial &gt; php -r &#8220;file_exists(&#8216;.env&#8217;) || copy(&#8216;.env.example&#8217;, &#8216;.env&#8217;);&#8221; Loading &hellip; <a href=\"https:\/\/myprojects.advchaweb.com\/index.php\/2016\/12\/27\/laravel-blog\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Laravel Blog&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14,13],"tags":[],"class_list":["post-1267","post","type-post","status-publish","format-standard","hentry","category-laravel","category-tutorial"],"_links":{"self":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/1267","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/comments?post=1267"}],"version-history":[{"count":9,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/1267\/revisions"}],"predecessor-version":[{"id":1305,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/1267\/revisions\/1305"}],"wp:attachment":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/media?parent=1267"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/categories?post=1267"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/tags?post=1267"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}