EExcel 丞燕快速查詢2

EExcel 丞燕快速查詢2
EExcel 丞燕快速查詢2 https://sandk.ffbizs.com/

laravel controller use class but no pass class ?

https://www.youtube.com/watch?v=ShrS3HXwzPg

class PostController extends Controller
{
  public function update(Post $post,
before

class PostController extends Controller
{
  public function update($post_id,
    $post = Post::findOrFail($post_id);

And many more things.

file_put_contents failed to open stream: Permission denied /tmp/cache/views/


php artisan view:clear
https://laracasts.com/discuss/channels/laravel/permission-denied-on-storageframeworkviews https://laravel.io/forum/07-06-2016-session-permissions-issue https://laracasts.com/discuss/channels/general-discussion/laravel-framework-file-permission-security

laravel livewire file update Real-Time File Validation mutile files

 https://laravel-news.com/livewire-file-upload


Real-Time File Validation

use Livewire\Component;
use Livewire\WithFileUploads;

class Show extends Component
{
    use WithFileUploads;
    
    public $files = [];
    
    
    public function updatedFiles() // 即時檢查檔案格式
    {
        $this->validate([
            'files.*' => 'image|max:1024', // 1MB Max
        ]);
    }
    
    public function store()
    {
        $filenames = collect($this->photos)->map->store('photos');
        'files' => $filenames->implode(','),
updatedFiles() is Hook into the “updated”

updatedPhoto  public $Photo
updatedPhotos public $photos = []
updatedFile   public $file
updatedFiles  public $files = []

laravel livewire Name problem

Use - and lowwercase

App/Http/Livewire/Order/DropdownMaterial.php

class DropdownMaterial extends Component
{

resources/views/livewire/order/create.blade.php

@livewire('order.dropdown-material', ['post' => $order_material_id])

Laravel livewire have Big Problem!

When juse livewire at blade.php

Must have Div At first.




<div style="text-align: center">
    <button wire:click="increment">+</button>
    <h1>{{ $count }}</h1>
</div>


<div>

<button wire:click="increment">+</button>
    <h1>{{ $count }}</h1>
    
<button class="btn btn-success btn-block" wire:click="create">
            {{ trans('global.add') }} {{ trans('cruds.order.title_singular') }}
        </button>   
</div>

laravel livewire namespace

App/Http/Livewire/Orders.php

namespace App\Http\Livewire;

use Gate;
use Livewire\Component;
use Symfony\Component\HttpFoundation\Response;

class Orders extends Component
{
    public function render()
    {
        abort_if(Gate::denies('order_access'), Response::HTTP_FORBIDDEN, '403 Forbidden');
        
        return view('livewire.order');
    }
}
resources/views/livewire/order.blade.php

@extends('layouts.app')
@section('content')
    @livewire('order.show')
@endsection
App/Http/Livewire/Order/Show.php

    namespace App\Http\Livewire\Order;

    public function render()
    {
        abort_if(Gate::denies('order_access'), Response::HTTP_FORBIDDEN, '403 Forbidden');
        
        $this->orders = Order::all();
        // Order::where('owner_id', auth()->id())->get(); // 只能看自己

        return view('livewire.order.show');
    }
resources/views/livewire/order/show.blade.php

{{ virables }}