I am Facing 404, The route public/livewire/message/software-category could not be found.
I am using Laravel 9 with livewire and my components are loaded perfectly but when I try to update any attribute value of the component, it returns 404 not found.
here is my .env
APP_URL=https://fyp.devndesigns.com/
ASSET_URL=https://fyp.devndesigns.com/public
here is my config/livewire.php in which I changed my asset_url but it is not working.
<?php
return [
/*
|--------------------------------------------------------------------------
| Livewire Assets URL
|--------------------------------------------------------------------------
|
| This value sets the path to Livewire JavaScript assets, for cases where
| your app's domain root is not the correct path. By default, Livewire
| will load its JavaScript assets from the app's "relative root".
|
| Examples: "/assets", "myurl.com/app".
|
*/
'asset_url' => env('ASSET_URL'),
/*
|--------------------------------------------------------------------------
| Livewire App URL
|--------------------------------------------------------------------------
|
| This value should be used if livewire assets are served from CDN.
| Livewire will communicate with an app through this url.
|
| Examples: "https://my-app.com", "myurl.com/app".
|
*/
'app_url' => null,
Change .env to :
APP_URL=https://fyp.devndesigns.com
ASSET_URL=https://fyp.devndesigns.com
and config/livewire.php
'asset_url' => env('ASSET_URL', null),
'app_url' => env('APP_URL', 'http://localhost'),
Related
As this question has been asked soo many time and the solution is clear, but my problem is I have done every possible solution but it still doesn't solve my error.
I have all the required folders
-storage
-app
-framework
-cache
-session
-testing
-views
-logs
and also all the ".gitignore" files as well
also have run permission command
Below is my config/view.php
<?php
return [
/*
|--------------------------------------------------------------------------
| View Storage Paths
|--------------------------------------------------------------------------
|
| Most templating systems load templates from disk. Here you may specify
| an array of paths that should be checked for your views. Of course
| the usual Laravel view path has already been registered for you.
|
*/
'paths' => [
resource_path('views'),
],
/*
|--------------------------------------------------------------------------
| Compiled View Path
|--------------------------------------------------------------------------
|
| This option determines where all the compiled Blade templates will be
| stored for your application. Typically, this is within the storage
| directory. However, as usual, you are free to change this value.
|
*/
'compiled' => env(
'VIEW_COMPILED_PATH',
realpath(storage_path('/storage/framework/views'))
),
];
I am running my Laravel Project on centos, using the default artisan server.
I am trying to add data to files, using laravel File::append command.
In config/filesystems.php i have the following:
'disks' => [
'local' => [
'driver' => 'local',
'root' => storage_path('data'),
],
and
/*
|--------------------------------------------------------------------------
| Default Filesystem Disk
|--------------------------------------------------------------------------
|
| Here you may specify the default filesystem disk that should be used
| by the framework. The "local" disk, as well as a variety of cloud
| based disks are available to your application. Just store away!
|
*/
'default' => env('FILESYSTEM_DRIVER', 'local'),
and 'FILESYSTEM_DRIVER' is not defined in the .env file.
However when i use File::append(), the files are created in the public folder, and not storage_path
Any idea what is causing this?What am i missing.
While Storage::put('filename.jpg', $contents); uses the default filesystem and thus expects a relative filename, File::append does not.
So a possible solution here could be File::append($path, 'yourAppend'); with the full path to your file in the storage folder.
I'm trying upgrade my laravel project from 5.2 to 5.3.
Since laravel 5.3, the route files are kept in a separate directory routes, instead of the previous app\Http directory. I created the file routes/web.app and pasted my routes into this file.
When i execute php artisan route:list, it returns:
+--------+----------+-------------------+------+--------------------------------------------+------------+
| Domain | Method | URI | Name | Action | Middleware |
+--------+----------+-------------------+------+--------------------------------------------+------------+
| | GET|HEAD | captcha/{config?} | | \Mews\Captcha\CaptchaController#getCaptcha | web |
+--------+----------+-------------------+------+--------------------------------------------+------------+
My routes/web.php file:
<?php
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::get('/', function(){
echo 'here';
});
Where is my route?
When I access the home page, it returns a 404 error, but the error comes from laravel.
The file .htaccess is ok.
You said:
I created the file routes/web.app and past my routes on file.
In Laravel 5.3 the web.php file is already created in the routes directory. If you have recreated this file that is where the problem may be propagating from.
I read the upgrade documentation and thought I needed to remove the EventServiceProvider, RouteServiceProvider, AuthServiceProvider methods from the boot ....
But in fact I needed to update the contents of these files.
After updating the contents to the new version 5.3 up to where I tested, it is working ....
I am building a frontend symfony app for a project with the current folder structure:
+---app
| +---conf
| +---lib
| | +---ca
| | | +---Search
+---frontend
| +---app
| +---bin
| +---src
| | \---PublicBundle
| | +---Controller
The app folder on root is where another (non symfony app) is located. It is a php app.
Inside the frontend folder is where symfony project is being built.
I am trying to load from inside the symfony app (from the public controller) a class from the other php app (a class inside the ca subfolder) but when I try to, symfony returns a namespace exception with the tip: Did you forget a "use" statement for another namespace?
It is correct to load a class from outside a symfony project like is, and if it is how is it done?
Thanks in advance,
Confused.
https://www.codeigniter.com/user_guide/general/caching.html
says caches are created in application/cache.
But, in the system config.php it says the default cache is in system/cache/.
/*
|--------------------------------------------------------------------------
| Cache Directory Path
|--------------------------------------------------------------------------
|
| Leave this BLANK unless you would like to set something other than the default
| system/cache/ folder. Use a full server path with trailing slash.
|
*/
Which, if any, does CI use?
application/cache is correct. It was changed to application/cache from system/cache in 2.0.0 according to the change log. The comments just weren't updated.