This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers; | |
use App\Image; | |
use App\Http\Requests\StoreImage; | |
use Illuminate\Support\Facades\Storage; | |
class ImageController extends Controller | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App; | |
use Illuminate\Database\Eloquent\Model; | |
use Illuminate\Support\Facades\Storage; | |
class Image extends Model | |
{ | |
/* Fillable */ | |
protected $fillable = [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Schema::create('images', function (Blueprint $table) { | |
$table->bigIncrements('id'); | |
$table->string('title'); | |
$table->string('path'); | |
$table->double('size', 8, 2)->default(0); | |
$table->unsignedInteger('auth_by'); | |
$table->timestamps(); | |
}); |
NewerOlder