How to run Laravel without Artisan?
I've solved the problem. The problem was in my htaccess and in mod_rewrite (Apache2). Now I can connect to my application only by typing localhost/public..
If anyone wants to make the application public, the more easy and fastest way is:
- Rename the "server.php" file in root directory, in "index.php"
- Move your .htaccess from public folder to root directory
- Make your directory accessible to Apache2 (set correct file/folder permissions).
Thanks to all users for help! :)
Important Edit
Consider using Apache Virtual Hosts (pointing the virtual host to the /public Laravel folder) instead of renaming server.php to index.php because by doing this you will need to prefix "public/" when you use the Laravel's asset() function in your views.
When working with other devs, who are using a different configuration, this might be a big problem because they will be able to see the assets while you will not (or viceversa).
run laravel project without artisan serve
For windows, you can try use Laragon.
How to run laravel on Xampp without Artisan
Ok so after all the things
I finally got it to working
No need to change the folder to laravel inside root project
No need to change the DocumentRoot
Just Had to change in blade.php from
<form action="/upload" method="post" enctype="multipart/form-data">
to
<form action="{{route('upload')}}" method="post" enctype="multipart/form-data">
How to run Laravel artisan command without using command line
@porloscerros comment helped me solve my problem, Here is how I did it
protected function createController() { $modelsingular = Str::singular(Str::ucfirst($this->getNameInput())); $modelplural = Str::plural($modelsingular);
$controller = Str::studly(class_basename($this->argument('name'))); $modelName = $this->qualifyClass($modelplural . '/' . $modelsingular);
$this->call('make:controller', [ 'name' => $modelplural.'\'.$controller.'Controller', '--model' => $this->option('resource') ? $modelName : null, ]);}
How to run Laravel project without php artisan serve in laravel 5.3
If you using LAMP and you want to run Laravel project without Artisan, you have to navigate from browser to /laravel/public
directory. Follow laravel documentation https://laravel.com/docs/4.2/quick
But if you getting errors like 500 and your page don't work, possibly you have to change permissions of your Laravel project directory.
Try sudo chmod -R 770 /path/to/your/laravel/project
or sudo chmod -R 775 /path/to/your/laravel/project
for more refer with this https://help.ubuntu.com/community/FilePermissions
Laravel 7.0 project run Without PHP artisan serve
I Solved this Problem like Changing PHP Version..
Because the Laravel 7.0 requires PHP version 7.2 Or Above but i am Running the Laravel 7.0 Application in 7.1 that's why it showiing like this..After Changing PHP version to 7.4 it fixed.....
Laravel small standalone one-off script without artisan command?
To fix the error you're getting, boot up the application's kernel and handle the response like so
app\script.php
<?php
use App\User;
require __DIR__.'/../vendor/autoload.php';
$app = require_once __DIR__.'/../bootstrap/app.php';
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
$response = $kernel->handle(
$request = Illuminate\Http\Request::capture()
);
echo "hello world\n";
$res = User::find(5)->name;
var_dump($res);
echo "end!\n";
Then from a terminal, run php app/script.php
Result:
~/Sites/laravel (master ✗) ✹ ★ ᐅ php app/script.php
hello world
string(11) "Khalid Bins"
end!
Related Topics
How to Display an Blob Image Stored in MySQL Database
PHP Mail Special Characters Utf8
Changing Woocommerce Cart Item Names
Double Results in My Array ( MySQL_Fetch_Array )
Replace Only First Match Using Preg_Replace
Trying to Access Array Offset on Value of Type Null
Combine PHP Prepared Statments with Like
PHP Simplexml Attributes Are Missing
Invalid JSON Parsing Using PHP
Bad Request. Connecting to Sites via Curl on Host and System
Sent Mails with PHPmailer Don't Go to "Sent" Imap Folder
What Is the "" Symbol in Url Used for in PHP
Change Single Variable Value in Querystring
Function Eregi() Is Deprecated
Downloading a File with a Different Name to the Stored Name
What Is the Pdo Equivalent of Function MySQL_Real_Escape_String