<repo_name>sanin25/test-3.ru<file_sep>/app/Http/routes.php
<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::get('/', function () {
    return view('welcome');
});

Route::auth();

Route::get('/admin', 'adminController@index');

Route::group(["" => "admin"], function(){
    Route::get("addpage", [
        "as" => "addPage",
        "uses" => "AdminController@addpage",
    ]);
    Route::post("/savepage",["as" => "savePage", "uses" => "adminController@savepage"]);
    Route::get("/getpage",["as" => "getPage", "uses" => "adminController@getpage"]);
});
<file_sep>/packages/src/Phpner/Lafiles/Http/routes.php
<?php 
Route::group(['middleware' => config('lafiles.middleware') ? config('lafiles.middleware') : null], function () {
    
    Route::get('lafiles/containers', [
        'as' => 'lafiles.containers',
        'uses' => '\Jasekz\Laradrop\Http\Controllers\LaradropController@getContainers'
    ]);
    
    Route::post('lafiles/move', [
        'as' => 'lafiles.move',
        'uses' => '\Jasekz\Laradrop\Http\Controllers\LaradropController@move'
    ]);
    
    Route::post('lafiles/create', [
        'as' => 'lafiles.create',
        'uses' => '\Jasekz\Laradrop\Http\Controllers\LaradropController@create'
    ]);
    
    Route::resource('lafiles', '\Jasekz\Laradrop\Http\Controllers\LaradropController');
    
});<file_sep>/readme.md
# Laravel sanin25 pack


<file_sep>/app/Http/Controllers/AdminController.php
<?php

namespace App\Http\Controllers;

use App\Http\Requests;
use App\Pages;
use DB;
use Illuminate\Http\Request;

class AdminController extends Controller
{
    /**
     * Create a new controller instance.
     *
     * @return void
     */
    public function __construct()
    {
        $this->middleware('auth');
    }

    /**
     * Show the application dashboard.
     *
     * @return \Illuminate\Http\Response
     */
    public function index()
    {
        return view('admin/admin');
    }

    public function addpage(){

        return view('admin/add_page');
    }

    public function savepage(Request $request)
    {
       // $fil = explode();
      var_dump($request->input("img"));
       // return redirect()->route('addPage')->with('status', $title);
    }
    public function getpage()
    {
        $page = DB::table('pages')->select('img_id')->get();

        $img_id = explode("|",$page[0]->img_id);

        $file = DB::table('laradrop_files')->whereIn('id', $img_id )->get();


      dd($file);
    }
}
