Answers for "Class 'Spatie\YamlFrontMatter\YamlFrontMatter' not found"

PHP
0

Class 'SpatieYamlFrontMatterYamlFrontMatter' not found

Route::get("posts/{post}", function ($slug) {

        $post = Post::find($slug);

        return view('post', [

            'post' => Post::find($slug)

        ]);

    })->where('post', '[A-z_-]+');

    Route::get('post', function () {

        $document = YamlFrontMatter::parseFile(

            resource_path('posts/fourthP.html')

        );

        ddd($document);

        /*

        return view('posts',[

            'posts' => Post::all()

        ]);

        */

    });

 

    /*isto pasa a estar no modelo, na criação do objeto

    Route::get('json', function () {

        return ['foo' => 'bar'] ; //pode ser usado para api´s
Posted by: Guest on January-05-2022

Code answers related to "Class 'Spatie\YamlFrontMatter\YamlFrontMatter' not found"

Browse Popular Code Answers by Language