Skip to content

Instantly share code, notes, and snippets.

@a-m-dev
Created May 24, 2019 19:09
Show Gist options
  • Save a-m-dev/459edb2041f2e6f55d58dc626db81146 to your computer and use it in GitHub Desktop.
Save a-m-dev/459edb2041f2e6f55d58dc626db81146 to your computer and use it in GitHub Desktop.
# 01 php -v
if you saw the php version you can skip this step else you need to install it. for installing php you need to run `sudo apt install php`. and after that you need to run `sudo apt install hhvm`. this would take cuple minutes. to varify that you can type this command to check the version of that `php --version`
# 02 installing composer
for installing composer you need to run run this command `sudo apt install composer`. to varify that you can type this command to check the version of that `composer --version`
# 03 navigating to folder directory
type this command to go inside the htdocs directory: `cd /opt/lampp` inside that directory you have `htdocs` folder. navigate inside of that with this command `cd ./htdocs`
and then create a folder with this command: `mkdir tmp`. the `tmp` is the folder name. just after creating the folder you need to navigate inside that folder with this command: `cd tmp`
# 04 creating laravel project
inside the htdocs folder you need to run this command to create a laravel project `composer create-project laravel/laravel tmp` the tmp is the folder name of your project. this command would take couple of minutes. just wait for it...
# 05 initializing project
for initializing project yo gonna have some problems like this two lines of errors while you gonna run `php artisan serve` command:`PHP Warning: require(/opt/lampp/htdocs/tmp/vendor/autoload.php): failed to open stream: No such file or directory in /opt/lampp/htdocs/tmp/artisan on line 18`
`PHP Fatal error: require(): Failed opening required '/opt/lampp/htdocs/tmp/vendor/autoload.php' (include_path='.:/usr/share/php') in /opt/lampp/htdocs/tmp/artisan on line 18`
if you saw this error you need to run `composer update` command, and probably that would give you this error: `the requested PHP extension mbstring is missing from your system.` for resolving this problem you need to install `php-mbstring` pkg. first of all run this command in terminal: `php --version` to see the version of the php that you runing on your system. if it was php 7.1 run this command:
- `sudo apt-get install php7.1-mbstring`
if it was php 7.2 run this one:
- `sudo apt-get install php7.2-mbstring`
if it was none of those cases run this command:
- `sudo apt-get install php-mbstring`
and finally you need to install `php7.2-xml` with this command:
- `sudo apt-get install php7.2-xml`
after these steps you gonna be safe && sound to run the `composer update` command inside your directory. so run it to update the composer. just note that this will take couple minutes.
# 06 finally serving the project
for serving the project you gonna need a key to be generated with artisan. for that purpose you need to run this command `php artisan key:generate` in the root directory of your folder. after that you need to run `php artisan serve` to get the basic laravel project up an running on port `:8000`.
# 07 CORE UI
this is step by step guid to getting core ui ready...
# 07.01 clone the proejct
just go inside the `/opt/lampp/htdocs` directory and clone the project with this command `git clone https://github.com/taboritis/coreui-laravel.git` after the cloning is completed, you gonna have a folder called `coreui-laravel` navigate inside that folder with this command `cd coreui-laravel`
# 07.02 install dependencies
for installing dependencies run this command `composer install`
# 07.03 create the env file
for creating the env file you need to copy all .env varibales from `.env,example` to `.env` file. there is a command to to that: `cp .env.example .env`
# 07.04 generate the artisan key
with this command: `php artisan key:generate`
# 07.05 creating the data base
go to `phpmyAdmin` and create the `coreui` db in there. and then run `php artisan migrate` inside the root directory of your project.
# 07.06 setting up the database
inside your `.env` file you need to change these variables
```
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=coreui
DB_USERNAME=root
DB_PASSWORD=
```
# 07.06 runing the artisan migrations
for creating the tables inside the coreui DB you need to run this command: `php artisan migrate`
# 07.07 register first
for loggin in in the coreui project you need to create an account. go to your browser and open this link `http://localhost:8000` this will bring up the login page. got to the register and create an account. if you get `PDO exception` error you just need to do this: `sudo apt-get install php7.2-mysql`. this will install the compatable version of my-sql with php 7.2 that would work correctly with each other.
# 07.08 you good to login
you create an account and you can log in now to your dashboard
# 08 love you!
best of luck my shiv...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment