PHP Classes

Vue.js PHP CRUD Example Using Laravel Vite: Example application to manage users and blog posts

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 53 All time: 10,652 This week: 41Up
Version License PHP version Categories
vuejs-crud-vite 1.0.0MIT/X Consortium ...5Web services, Design Patterns, Blogs, P..., A...
Description 

Author

This package implements an example application to manage users and blog posts.

It implements controller classes to manage the records of users and blog posts.

The presentation uses Laravel Vite to provide the assets to render the application pages using Vue.js and Inertia.js to build a single-page application.

The package also implements an API using the Laravel Sanctum application.

Innovation Award
PHP Programming Innovation award nominee
January 2024
Number 6
Laravel is a popular framework that many PHP developers use to implement applications using packages that extend Laravel capabilities to implement PHP Web applications and APIs.

Laravel Vite implements single-page web applications using Vue.js and Inertia.js JavaScript libraries to quickly update the application's user interface pages.

Laravel Sanctum implements an API with the same code used to implement a Laravel Web application.

This package provides an example Laravel application that uses Laravel Vite and Laravel Sanctum to implement a blog system with user and blog post management.

Manuel Lemos
Picture of Rodrigo Faustino
  Performance   Level  
Innovation award
Innovation award
Nominee: 23x

Winner: 4x

 

Example

<?php

use Illuminate\Contracts\Http\Kernel;
use
Illuminate\Http\Request;

define('LARAVEL_START', microtime(true));

/*
|--------------------------------------------------------------------------
| Check If The Application Is Under Maintenance
|--------------------------------------------------------------------------
|
| If the application is in maintenance / demo mode via the "down" command
| we will load this file so that any pre-rendered content can be shown
| instead of starting the framework, which could cause an exception.
|
*/

if (file_exists($maintenance = __DIR__.'/../storage/framework/maintenance.php')) {
    require
$maintenance;
}

/*
|--------------------------------------------------------------------------
| Register The Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader for
| this application. We just need to utilize it! We'll simply require it
| into the script here so we don't need to manually load our classes.
|
*/

require __DIR__.'/../vendor/autoload.php';

/*
|--------------------------------------------------------------------------
| Run The Application
|--------------------------------------------------------------------------
|
| Once we have the application, we can handle the incoming request using
| the application's HTTP kernel. Then, we will send the response back
| to this client's browser, allowing them to enjoy our application.
|
*/

$app = require_once __DIR__.'/../bootstrap/app.php';

$kernel = $app->make(Kernel::class);

$response = $kernel->handle(
   
$request = Request::capture()
)->
send();

$kernel->terminate($request, $response);


  Files folder image Files (130)  
File Role Description
Files folder imageapp (5 directories)
Files folder imagebootstrap (1 file)
Files folder imageconfig (15 files)
Files folder imagedatabase (3 directories)
Files folder imagelang (1 directory)
Files folder imagepublic (3 files)
Files folder imageresources (3 directories)
Files folder imageroutes (5 files)
Files folder imagetests (2 files, 2 directories)
Accessible without login Plain text file .editorconfig Data Auxiliary data
Accessible without login Plain text file .env.example Data Auxiliary data
Plain text file artisan Class Class source
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file composer.lock Data Auxiliary data
Accessible without login Plain text file jsconfig.json Data Auxiliary data
Accessible without login Plain text file package-lock.json Data Auxiliary data
Accessible without login Plain text file package.json Data Auxiliary data
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Accessible without login Plain text file postcss.config.js Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation
Accessible without login Plain text file tailwind.config.js Data Auxiliary data
Accessible without login Plain text file vite.config.js Data Auxiliary data

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:53
This week:0
All time:10,652
This week:41Up