Skip to main content

Posts

Showing posts from February, 2020

Laravel mix to compile multiple css files

Laravel mix to compile multiple css files 1) Create a laravel project. (for beginner) 2) If you go to public folder which is right on top of the resource folder. Inside public folder there you will see two folders. One is for css and another is for Js. There is a app.css in a css folder. The app.css file has been declared in the head section of app.blade.php which is inside the resources->views->layouts folder. 3) Let's create a custom css file inside the public css folder. In our case we are naming this as style.css 4) write any css as per your style in the style.css (our motive is to mix all those css files into one css file. Laravel will get every css design from that one css file) 5) Now open webpack.mix.js file which is present at the bottom of our laravel project.  Or, type ctrl+p and write webpack.mix.js and open it. 6) In webpack.mix.js file you will see this: mix.js("resources/js/app.js", "public/js").sass(     ...

GITHUB Instructions (GITHUB USEFUL COMMANDS)

1) create repository 2) copy HTTPS 3)go to project directory and open git bash 4) ls 5) git init 6) git remote add origin  ( paste the link of number 2, don't give any bracket ) 7) git remote -v 8) git add . 9) git commit -m "First Commit" 10) if the above line of code ask the question like who you are?     than use the following code: git config --global user.email "some@email.com" git config --global user.name "ha"     than use the following code: git commit -m "First Commit" 11) git push origin master 12) if number 11 says rejected! than use the following command: git push -u -f origin master for any help use the following command: git help ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ To update any changes to github: _____________________________ 1)  git status 2) git add . 3) git status 4) git commit -m "any message regarding commit" 5) git status 6) gi...

SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL: alter table `users` add unique `users_email_unique`(`email`))

When you initally migrate to the database you might get this error: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL: alter table `users` add unique `users_email_unique`(`email`)) So, to solve this error open your  AppServiceProvider.php   which is inside App\Provider\AppServiceProvider. import this at the top: use Illuminate \ Support \ Facades \ Schema ; and write Schema :: defaultStringLength ( 191 ); inside the boot function. Like this: public function boot () { Schema :: defaultStringLength ( 191 ); } Now, Delete User and migration tables from the database. Otherwise you will see that error again. Now, run the migration again. Thanks!

Failed to authenticate on SMTP server error using gmail

If you have faced the error which looks like this: Failed to authenticate on SMTP server with username mygmail@gmail.com using 3 possible authenticators. Authenticator LOGIN returned Expected response code 235 but ... Then, Go to  https://accounts.google.com/UnlockCaptcha  and sign in to that account which you have provided as your gmail id and password in the laravel .env file. This will unlock your account for access through other media/sites.