topstarwebking / Tlancer

This is the online tutor platform

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Test Laravel React application

Please read information below before you start!

Requirements:

Please note the new "--seed" added to migration

  1. composer
  2. php 8.1+
  3. mysql 8+

Installation:

  • cd /to folder where you want to install this app (for example: cd /desktop/new folder)
  • git init
  • git remote add origin https://github.com/Tlancerinc/tlancer_mvc.git
  • git pull
  • cd /inside downloaded project
  • composer install
  • cp .env.example to .env
  • open .env file and add empty database from your mysql
  • php artisan migrate --seed
  • npm run dev
  • open second console, shell or bash and run command "php artisan serve"
  • after this you will be able to visit web page on http://127.0.0.1:8000

Localization

Backend Translation

To set localization we use route with name language

Route::get('language/{language}', function ($language) {
Session()->put('locale', $language);

return redirect()->back();
})->name('language');

You can pass parameters to this route like:

<Link href={route('language','en') >ENG</Link>

Where language is route name and en is parameter which indicates on language you want to set.

language translations ar located in ./lang folder. currently we only have ka.json where the translations are writen

you can make a new translation like this:

{
    "Home": "მთავარი"
}

and this json file wil be sent to frontend for translation from app/Http/Middleware/HandleInertiaRequests.php

Frontend Translation

to use translation you need to import Trans function like:

import { Trans } from "../Localization/Trans"

and then call function Trans where you need to, like:

{ trans('Home') }

and if languege is set to en it will return "Home" and if ka will return "მთავარი" translated version

React Select Library

A flexible and beautiful Select Input control for ReactJS with multiselect, autocomplete, async and creatable support.

Github link: https://github.com/jedwatson/react-select

React Select Documentation link: https://react-select.com/home#getting-started

Import Example: import Select from 'react-select'

For more information and usages please read documentation.

iamcares

Checking write access to git.

About

This is the online tutor platform


Languages

Language:JavaScript 70.7%Language:PHP 25.4%Language:Blade 3.2%Language:CSS 0.6%Language:Shell 0.2%