Skip to content

helwy/tayar

 
 

Repository files navigation

Laravel Tayar - لارافل تيار

Introduction - المقدمة

Laravel Tayar is Laravel Jetstream on Fesikh. It is a fork that adds some important enhancements that are not supported out of the box and can take time when setting projects up. This should help you avoid wasting several hours implementing these needed features for every new project you create.

Please note that this mainly focuses on the Inertia (Vue.js) stack at the moment with some but not full attention given to the Livewire side, though it can also be a better starting point than Jetstream for Livewire projects also for some features (The localisation files can still be used with minimal effort for example).

Features - الخصائص

  • Localisation support using laravel-vue-i18n, with English and Arabic translations included out of the box.
  • Supports right-to-left (RTL) layouts for specified languages.
  • Language switcher in the top navigation bar, persisted in a cookie and user database.
  • Dark mode support and toggle in top bar, persisted in a cookie and user database.
  • Admin boolean for users, and dashboard / control panel only accessible to them.
  • Admin layout with a fixed top navigation bar and a fixed sidebar. Unified navigation items variable.
  • Frontend layout template.

Installation - التثبيت

Start with creating a new Laravel project:

composer create-project laravel/laravel tayar-app

cd tayar-app

composer require helwy/tayar:5.x-dev

There are multiple different configurations for the default jetstream installation, you can find more about it here, but for the one mainly used while developing this fork, I install with Inertia (Vue 3) and Dark mode support.

php artisan jetstream:install inertia --dark

Finalise the installation

npm install
npm run build
php artisan migrate

Then serve your application

php artisan serve

Usage - الاستخدام

  • Available Locales - The available locales are defined in the config/jetstream.php file using the the available_locales key in the Tayar configurations section. You can add or remove locales from there. When you add an unsupported locale (doesn't have a translation file yet), you will have to create the translation files for it in the resources/lang directory. The default locales are English and Arabic.
  • RTL Layout Support - In order to use the RTL layout for certain langauges, go to the config/jetstream.php and look for the rtl_locales key in the Tayar configurations section. Add or removes the locales you want to support RTL for in this array. The default is only Arabic.

Important Links - الروابط المهمة

FAQ - الأسئلة الشائعة

  1. What to do if I don't want to have multiple locales?
  • By keeping only one locale in the available_locales array in configuration, the language switcher will not be displayed in the UI, and you won't have to worry too much about localisation, though I would advise to keep using the localisation files for any static text in your application to make it easier to localise in the future if needed.
  1. What if I don't need RTL languages?
  • Keeping the rtl_locales in the configuration file as an empty array will not use RTL layout for any language. You may also remove the rtl class check in the app.blade.php body element classes, but that is optional.

Contact - التواصل

Contributing - المساهمة

License - الترخيص

Laravel Tayar is open-sourced software licensed under the MIT license.

About

Laravel Jetstream on Fesikh

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 53.3%
  • Vue 28.4%
  • Blade 17.6%
  • Other 0.7%