PHP code example of maplesnow / laravel-yaml-translation

1. Go to this page and download the library: Download maplesnow/laravel-yaml-translation library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

maplesnow / laravel-yaml-translation example snippets


class ModuleRequest extends BaseRequest {

    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize() {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules() {
        # 指定模块
        $this->setModule("module");
        return [
            'name' => '

dump(trans("lang.message.hello",['name','laravel-yaml']));

php artisan vendor:publish --provider="MapleSnow\Yaml\TranslationServiceProvider"