Download the PHP package opoink/oliv without Composer
On this page you can find all versions of the php package opoink/oliv. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package oliv
Getting Started
Installation
- Requirements
- PHP 8.3 and up
- Node v18.17.0, v23.5.0
- MySQL: this package is created using MySQL version 9.1.0 - MySQL Community Server - GPL
- Install Laravel 11.31.x and above without a starter kit, see Laravel's documentation
Would you like to install a starter kit? [No starter kit]:
Which database will your application use? [mysql]
Default database updated. Would you like to run the default database migrations? (yes/no) [no]
- Install oliv package
composer require opoink/oliv
- Let Laravel discover the Oliv package
php artisan package:discover
if not discovered yet - run the command
php artisan oliv:install
this will initiate all required files
- Let Laravel discover the Oliv package
- (optional) change the value of the
VITE_ADMIN_URL
of your choice - (optional) Change the value of the
VITE_INERTIA_SSR_PORT
inecosystem.config.js
of your choice - Update database host, user, pass, name
- create file
plugins/config.json
you can copy it fromplugins/config.sample.json
- run the command
php artisan oliv:plugins-update
this will compile and update all plugins set at the config.json file - Optional
php artisan migrate
to migrate database - run command
npm install
ornpm i
Run laravel
php artisan serve
Run InertiaJS
npm run dev
Build InertiaJS App
- build only:
npm run build
- build with SSR:
npm run build:ssr
- using php artisan:
php artisan inertia:start-ssr
- using pm2:
pm2 start ecosystem.config.js
Commands
php artisan oliv:plugins-update
- Please refer to Laravel documentation for the rest of the command
Clear the View Cache
php artisan view:clear
: run this command if the domain URL is changed, or a new route is added
Global Components
In the plugins/<VendorName\>/<PluginName>/resources/js/GlobalComponents
add your vue component file with ext of lowercase .vue
e.g NewComponent.vue
then you can call it on your vue template as <VendorNamePluginNameGlobalComponentsNewComponent />
If you add a vue file into sub-directories e.g plugins/<VendorName>/<PluginName>/resources/js/GlobalComponents/Blog/Post/Comments.vue
then you can call it in your template as <VendorNamePluginNameGlobalComponentsBlogPostComments />
All global components are ready and available in all Vue templates.
Note: run php artisan oliv:plugins-update
every time a new Global Component file is added or removed
Event/Listeners
- On your plugin create a directory
EventListeners
e.g.plugins/<VendorName>/<PluginName>/EventListeners
-
Inside
EventListeners
create a fileEventList.php
-
Create event listener class in
plugins/<VendorName>/<PluginName>/EventListeners/<MyEventListener.php>
- Common event names
db_<TableName>_save_before
This event is triggered only for specific database tables before the save.db_<TableName>_save_after
This event is triggered only for specific database tables after the save but not yet committed, therefore, when an event handler throws an exception it will rollback.db_<TableName>_save_commit_after
This event is triggered only for specific database tables after the save, therefore, when an event handler throws an exception it will not rollback.db_model_commit_after
This event is triggered on model save regardless of the table name.
Note: We are not using the default Laravel event listeners and dispatchers; instead, we are using custom events.
Learning Laravel
Laravel has the most extensive and thorough documentation and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.
You may also try the Laravel Bootcamp, where you will be guided through building a modern Laravel application from scratch.
If you don't feel like reading, Laracasts can help. Laracasts contains thousands of video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.
InertiaJS
All versions of oliv with dependencies
inertiajs/inertia-laravel Version ^2.0
tightenco/ziggy Version ^2.4.2
laravel/sanctum Version ^4.0
laravel/tinker Version ^2.9
phpmailer/phpmailer Version ^6.9.2