genially marcas de tiempo y resources
This commit is contained in:
parent
10a8019333
commit
1a64168bcf
1
BD/marcas de tiempo y resources.txt
Normal file
1
BD/marcas de tiempo y resources.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
https://view.genially.com/68c97d958c8712bbc24eb767
|
||||
|
|
@ -9,24 +9,7 @@ use App\Models\Categorias;
|
|||
|
||||
class CategoriasController extends Controller
|
||||
{
|
||||
public function index(Request $request){
|
||||
|
||||
$categorias = Categorias::all();
|
||||
|
||||
// $categorias = Categorias::findOrFail(13);
|
||||
//$cat = Categorias::where('id_categoria', 1)->first();
|
||||
//$categorias = Categorias::where('descripcion', 'Cursos, capacitaciones y formación')->get();
|
||||
//$categorias = Categorias::where('descripcion', 'like', '%Prod%')->get();
|
||||
|
||||
//$categorias = Categorias::orderBy('nombre', 'desc')->get();
|
||||
|
||||
//$categorias = Categorias::first();
|
||||
//$categorias = Categorias::last();
|
||||
/*Categorias::count();*/
|
||||
|
||||
|
||||
return view('categorias.index', ["categorias"=>$categorias]);
|
||||
}
|
||||
|
||||
public function show($id){
|
||||
$categoria = Categorias::findOrfail($id);
|
||||
return view('categorias.show', ["cat"=>$categoria]);
|
||||
|
|
@ -39,9 +22,7 @@ class CategoriasController extends Controller
|
|||
}
|
||||
|
||||
|
||||
public function create(){
|
||||
return view('categorias.new');
|
||||
}
|
||||
|
||||
|
||||
public function store(Request $request){
|
||||
|
||||
|
|
|
|||
|
|
@ -4,16 +4,18 @@ namespace App\Models;
|
|||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
class Categorias extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
|
||||
|
||||
protected $table = 'categorias';
|
||||
|
||||
public $primaryKey = 'id_categoria';
|
||||
|
||||
public $timestamps = false;
|
||||
public $timestamps = true;
|
||||
protected $fillable = [
|
||||
'nombre',
|
||||
'descripcion',
|
||||
|
|
|
|||
|
|
@ -70,7 +70,8 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'timezone' => 'UTC',
|
||||
//'timezone' => 'UTC',
|
||||
'timezone' => 'America/Argentina/Catamarca',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -17,10 +17,14 @@ Route::get('/', function () {
|
|||
return view('welcome');
|
||||
});
|
||||
|
||||
Route::get('categorias', [CategoriasController::class, 'index'])->name('categorias.index');
|
||||
/*Route::get('categorias', [CategoriasController::class, 'index'])->name('categorias.index');
|
||||
Route::post('categorias', [CategoriasController::class, 'store'])->name('categorias.store');
|
||||
Route::get('categorias/create', [CategoriasController::class, 'create'])->name('categorias.create');
|
||||
Route::get('categorias/{categoria}', [CategoriasController::class, 'show'])->name('categorias.show');
|
||||
Route::delete('categorias/{categoria}', [CategoriasController::class, 'destroy'])->name('categorias.destroy');
|
||||
Route::get('categorias/{categoria}/edit', [CategoriasController::class, 'edit'])->name('categorias.edit');
|
||||
Route::put('categorias/{categoria}', [CategoriasController::class, 'update'])->name('categorias.update');
|
||||
Route::put('categorias/{categoria}', [CategoriasController::class, 'update'])->name('categorias.update');*/
|
||||
|
||||
|
||||
|
||||
Route::resource('categorias', CategoriasController::class);
|
||||
Loading…
Reference in New Issue
Block a user