Laravel missing make:auth command - php

I trying make login system in current laravel project with command make:auth.
but somehow the make:auth command is missing from php artisan.
It weird because before I start my current project the command is available. So I tried update my composer anyway just to make sure. and it still missing in current project.
Tried make another new project and the make:auth command is available.
My question is, How to make the make:auth command available in current project without start all over in new project?

Related

How can I organize my laravel project's github repository so that users can easily install and run it?

Five months ago I created a pretty extensive Laravel Blog Management system. I am now at a point where I am looking for a job and would like for potential employers to be able to easily install and run my project to check it out. I want to include instructions in the readme.md on how to get it started but I've just realized that I can't figure out how to run it myself!
Here is the repository: https://github.com/colesam/Laravel-Blog
Here is what I've tried:
git clone git#github.com:colesam/Laravel-Blog.git
composer install
php artisan serve
This copied the repo into my xampp/htdocs directory and ran it. XAMPP is currently running with MySQL and Apache running.
The console responds by telling me it's being served on localhost:8000. Unfortunately I receive an error message on the actual html doc:
What is going wrong with my project and how can I make this as easy as possible for my potential employers / anyone who would like to download and check out my project?
It's really easy actually. Takes about ~5 minutes. Here are the steps:
Clone the project
Create a database
Copy .env.example to .env and set the correct database credentials
Run php artisan key:generate to generate the app key
Run php artisan migrate to create the tables
Run php artisan serve
And you're done.

How to run artisan outside of Laravel?

Is it possible to run Artisan commands from a script that is not part of Laravel?
How can I import artisan into my script?
<?php
Artisan::call('some:command');
This script will is not part of Laravel and just a regular old php file. My question is, how can I import Artisan into my script?
My final goal, is to automate the installation of my app, I need to run a migrations, seeds and a couple other things.
Unfortunately, you cannot use artisan without Laravel as it is not a stand-alone package and requires the full Laravel framework.
However, Artisan is based on the Symfony Console package which can be added to your script as a stand-alone package, which is the closest you will get to Artisan without writing a custom bash script.
http://symfony.com/doc/current/components/console.html

laravel 5.4 migration issue

I am having a very weird issue when running
php artisan migrate
on a new installation of Laravel 5.4 on a local XAMPP server with php 7.1.1.
What it is doing is creating a migrations and users table, the default tables in older versions of Laravel. What is should be creating is a users table and a passwords reset table, the new default tables. My env file is correct because I am connecting to the database correctly but then if I change the table I am connecting to in the env file it is not updating.
To me, it seems like the command is simply not running on the correct migrations folder in the application. This is a brand new machine with a fresh install of XAMPP and Laravel so I am very confused as to why this is happening. Any help would be much appreciated!!!
I was finally able to get this to work so I wanted to answer the question to explain what I did.
This first step may not be required for you but it was for me. Once again, here is what I was using: Laravel 5.4 on a local XAMPP server with php 7.1.1
-First I needed to edit app>Providers>AppServiceProvider.php https://laravel-news.com/laravel-5-4-key-too-long-error
-Add this line to the top, under the other use include: use Illuminate\Support\Facades\Schema;
-In the boot() function add this code: Schema::defaultStringLength(191);
-After that I needed to run php artisan migrate, to create the default tables from the migrations. For some reason, a reason I could not find with any amount of research, this creates the old tables from an unknown source. After that I needed to edit the create_users_table migration, delete the users and migrations table that were created in the database, then rerun php artisan migrate. Like I said, I am not sure why this has to be done but it will get it to work.
Also, remember to run these commands before running php artisan migrate the last time just to be safe:
php artisan cache:clear
php artisan config:cache
php artisan migrate:refresh
php artisan migrate

Using Illuminate Database outside Laravel without PHP Artisan Commands

I'm trying to set up database migrations using Illuminate's Database outside of a Laravel 4.2 project. Everything I'm reading online indicated that it is completely doable to use any Illuminate components outside of Laravel, but the difficulty I'm having is creating the database migrations without using Artisan commands ("php artisan make:migration create_user_table"). If any one could help me out with this, I'd really appreciate it, because I know someone has had to find a solution to the problem before.
Thanks!
If you want to use artisan commands you should include the package of it and configure your application accordingly.
illuminate\database package doesn't provide you and artisan commands to use.

How to clear the Laravel Application Key via Terminal

I'm creating a application. I want to clear the Laravel Application key via terminal. Not manually.
Is there any way to clear via artisan. I can only generate via following command
php artisan key:generate
But there is no option to delete the key via artisan command.
There's no way as I of right now I believe, but if you use git just fork laravel, go ahead and empty the application key and whenever starting a new Laravel project clone from your repo and just generate a key without editing anything.
I see that you're using Ubuntu, but just so you know there is a OSX extension for Alfred for creating Laravel projects here and comes with Jeffrey Way's Generator.

Categories