I have PHP with Apache2 and I want to run Laravel Framework without Artisan but I can\'t! Does anyone know how to run Laravel without Artisan?
Easy solution without any code alterations
public/
folder of laravel project. OR
.htaccess
in project folder and add below code. This code will rewrite domain to public/
folder of your laravel projectRewriteEngine on
RewriteRule ^(.*)?$ ./public/$1
In case, if you want to do this in local then create .htaccess
files as mentioned in above point with the given code and do the following
$ cd your_project_path/
$ php -S localhost:8000
Hope this is helpful.
Laravel framework is such a pain in the ass for startup PHP guys who are not much oriented about what the hell composer is, and where .phar files are coming from and what are they, and why "Artisan" is trying to ruin your PHP life. Most people are looking for a PHP framework where all you have to do is download, extract and code. Nevertheless to make things work, you just need to install Laravel through Composer:
composer global require "laravel/installer=~1.1"
Anyway, you can download Composer from http://getcomposer.org/
After you install Laravel through Composer, navigate to your local server's directory. You might want to use "CD" (Change directory) to do this. (I'm speaking of CLI, whether you're in BASH(Linux) or CMD(Windows)) Then create your very first Laravel project by typing this in command line:
laravel new mywebsite1
Replace "mywebsite1" with your first project name. And there you go, you're ready to hit the Laravel road.
In my case, I'm still using Windows XP in such development and shifts back to Ubuntu Trusty whenever I feel like I want to smell Linux scent. So Composer installs "Laravel installer" in:
%userprofile%\Application Data\Composer\vendor\bin
So I make a backup copy of this directory so the next time I use Laravel on other unit with no internet connection, I just have to extract it, and run:
laravel new [myprojectname]
within the same directory and copies the resulting folder to my XAMPP's htdocs or WAMP's www folder.
Anyway I'm just sharing my approach for those with no 24/7 internet connection at home :p
After all it's still best for everyone to read the documentation on how to properly install Laravel: http://laravel.com/docs/5.0/installation
Well , the easy way is
1) create a new folder"Project" and copy all files except public folder content to project folder
2) copy all files of public folder to root
and you can run laravel without artisan.If you rename server.php and copy .htaccess , it may make trigger some error when you try to run auth artisan command.I experienced problem with auth command.
I got mine to work by adding the following block to my apache vhost conf file
<VirtualHost *:8003>
ServerName myproject
DocumentRoot "/path/to/myproject/public"
</VirtualHost>
and running sudo chown -R daemon storage
from my project root
I am using xampp in mac
inside htdocs / run following commadn $ laravel new myblog
After successfully creation run following and do following
Change server.php to index.php (@ root directory)
copy .htaccess from public to root directory
(optional) in Resources / app.blade.php --> Change to
run following http://localhost/myblog/