MINI MINI MANI MO

Path : /var/www/html/sistemas/saplxi/app/Http/Controllers/AsuntosParlamentarios/
File Upload :
Current File : /var/www/html/sistemas/saplxi/app/Http/Controllers/AsuntosParlamentarios/ResolucionesController.php

<?php

namespace App\Http\Controllers\AsuntosParlamentarios;

use App\Http\Controllers\Controller;
use App\Models\CddIniciativas;
use Illuminate\Http\Request;
use function view;

class ResolucionesController extends Controller
{
    /**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function index()
    {
        // $query  = "SELECT * FROM cdd_iniciativas ORDER BY presentada DESC, categoria ASC, id DESC LIMIT 15";
        $resoluciones = CddIniciativas::orderBy("presentada", "DESC")->orderBy("categoria", "ASC")->orderBy("id", "DESC")->take(15)->get();
        // dd($resoluciones);
        return view("asuntosparlamentarios.pages.resoluciones.index", compact("resoluciones"));
    }

    /**
     * Show the form for creating a new resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function create()
    {
        //
    }

    /**
     * Store a newly created resource in storage.
     *
     * @param \Illuminate\Http\Request $request
     * @return \Illuminate\Http\Response
     */
    public function store(Request $request)
    {
        //
    }

    /**
     * Display the specified resource.
     *
     * @param int $id
     * @return \Illuminate\Http\Response
     */
    public function show($id)
    {
        //
    }

    /**
     * Show the form for editing the specified resource.
     *
     * @param int $id
     * @return \Illuminate\Http\Response
     */
    public function edit($id)
    {
        //
    }

    /**
     * Update the specified resource in storage.
     *
     * @param \Illuminate\Http\Request $request
     * @param int $id
     * @return \Illuminate\Http\Response
     */
    public function update(Request $request, $id)
    {
        //
    }

    /**
     * Remove the specified resource from storage.
     *
     * @param int $id
     * @return \Illuminate\Http\Response
     */
    public function destroy($id)
    {
        //
    }

    public function iniciativas()
    {
        $resoluciones = CddIniciativas::where('categoria', 'Iniciativa')->orderBy("folio", "DESC")->get();
        // dd($resoluciones);
        return view("asuntosparlamentarios.pages.resoluciones.iniciativas", compact("resoluciones"));
    }

    public function puntosdeacuerdo()
    {
        $resoluciones = CddIniciativas::where('categoria', 'Punto de acuerdo')->orderBy("folio", "DESC")->get();
        // dd($resoluciones);
        return view("asuntosparlamentarios.pages.resoluciones.puntosdeacuerdo", compact("resoluciones"));
    }

    public function getIniciativa($id)
    {
        $iniciativa = CddIniciativas::find(base64_decode(base64_decode($id)));
        return view("asuntosparlamentarios.pages.resoluciones.iniciativa", compact("iniciativa"));
    }
}

OHA YOOOO