Start New Project is the title of the next part of Build a Blog with Laravel and is where we are at right now. In this second part, we will start a new Laravel based Blog. Do Part1 Get Started before going any further, unless you already using Larvel globally.
Related Articles
Start a New Project
The first thing we need is a name for a blogging system. Why are we doing a Blogging System? Well it seems that many tutorials are done that way. This causes me to think that it may be easier to learn. Most people know what a blog is. They also know what they expect to see when viewing a blog.
I do feel that way as I was using Symfony 3. I used old tutorials and made them work. I learned a lot about Symfony that way. I hope that will also be the case with using the Laravel Framework.
1. Choose a Project Name
I will use the name mxBlog for this project. So on the command line, do this:
laravel new mxBlog
2. Set Permissions
Set the permissions in your Project Directory. Mein is ~/public_html/mxBlog
– change if needed.
chown -R www-data.www-data ~/public_html/mxBlog/ chmod -R 755 ~/public_html/mxBlog/ chmod -R 777 ~/public_html/mxBlog/storage/
3. .htaccess
I like adding an .htaccess file to to root of the project. Mein is like this :
# Enable rewrite engine and route requests to framework RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} ^/robots.txt RewriteRule ^(.*)$ /public/robots.txt [L] # resources RewriteCond %{REQUEST_URI} ^/images/ [OR] RewriteCond %{REQUEST_URI} ^/js/ [OR] RewriteCond %{REQUEST_URI} ^/fonts/ [OR] RewriteCond %{REQUEST_URI} ^/css/ RewriteRule ^(.*)$ /public/$1 [L] RewriteCond %{REQUEST_URI} !^/public/ RewriteRule ^(.*)$ /public/$1 [QSA,L]
Now you should see your project site start page. In my case it’s, http://mxblog.dev.
We will now move on to the next Step.
The post Build a Blog with Laravel – Part2 Start New Project appeared first on HubShark™.