This is the backend code for the Imara TV.
- PHP 8.2+
- MySQL 8+
- Apache/Nginx Server
- Composer for PHP packages installation
- Node JS and NPM for js packages installation
- Git
- Clone git repo:
git clone https://github.com/ImaraTv/ImaraTV_Dashboard.git imaratv-dashboard
. This will clone the project into a directory namedimaratv-dashboard
- Navigate into the project directory
- make storage folder writable
- run
composer install
to install required php packages - copy
.env.example
to.env
- edit the new
.env
to add database credentials and also update APP_URL and also LIVEWIRE_UPDATE_URL if necessary - run
php artisan key:generate
to generate app key - run
php artisan migrate
to migrate db tables - run
php artisan shield:super-admin
to create admin user - run
php artisan shield:install
to install the roles and permissions - run
php artisan storage:link
to add a symbolic link to thestorage/app/public
directory to make files stored instorage/app/public/
to be publicly available - Navigate to installation url e.g http://localhost/imaratv-dashboard/login
-
livewire.js error 404:
- run
php artisan livewire:publish
- then run
php artisan cache:clear;php artisan config:clear;php artisan route:clear;php artisan view:clear;
- run
-
Trouble login in with error "THE POST METHOD IS NOT SUPPORTED FOR ROUTE LOGIN. SUPPORTED METHODS: GET, HEAD."
- it means livewire.js is not getting loaded
- run
php artisan vendor:publish --force --tag=livewire:assets
- then edit
routes/web.php
to set correct routes for Livewire: - NB: make sure that LIVEWIRE_UPDATE_URL in
.env
is correctly set
Livewire::setScriptRoute(function ($handle) { return Route::get('/vendor/livewire/livewire.js', $handle); }); Livewire::setUpdateRoute(function ($handle) { return Route::post(env('LIVEWIRE_UPDATE_URL'), $handle); });