如有任何問題或建議,請聯絡:
Email: mat@hummingfood.com
如有任何問題或建議,請聯絡:
Email: mat@hummingfood.com
| <?php | |
| namespace App\Http\Controllers; | |
| use App\Services\SFileService; | |
| use Illuminate\Http\Request; | |
| class ExampleController extends Controller | |
| { | |
| public function uploadImage(Request $request) |
| <?php | |
| namespace App\Providers; | |
| use Illuminate\Support\ServiceProvider; | |
| use Illuminate\Support\Facades\File; | |
| use Inertia\Inertia; | |
| class AppServiceProvider extends ServiceProvider | |
| { |
| const assert = require("assert"); | |
| export const translations = { | |
| methods: { | |
| __(key, replacements = {}) { | |
| // let translation = window._translations[key] || key; | |
| // console.log(window._translations); | |
| let translation = this.__findSentence(key, window._translations); | |
| Object.keys(replacements).forEach((r) => { | |
| translation = translation.replace(`:${r}`, replacements[r]); |
| <?php | |
| namespace App\View\Components; | |
| use App; | |
| use Illuminate\Support\Facades\Cache; | |
| use Illuminate\Support\Facades\File; | |
| use Illuminate\View\Component; | |
| class Translations extends Component |