Skip to content

Commit

Permalink
laravel new
Browse files Browse the repository at this point in the history
  • Loading branch information
componavt committed Aug 13, 2016
1 parent e7d2498 commit 1af2725
Show file tree
Hide file tree
Showing 29 changed files with 638 additions and 118 deletions.
12 changes: 4 additions & 8 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,19 @@ APP_ENV=local
APP_KEY=SomeRandomString
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://localhost
APP_URL=http://local.dictorpus.com/

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret
DB_DATABASE=dictorpus
DB_USERNAME=dictorpus_user
DB_PASSWORD=dictorpus_pass

CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_PORT=2525
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
Homestead.yaml
Homestead.json
.env
/nbproject/private/
27 changes: 27 additions & 0 deletions app/Http/Controllers/Dict/LangController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

namespace App\Http\Controllers\Dict;

use Illuminate\Http\Request;

use App\Http\Requests;
use App\Http\Controllers\Controller;
use App\Models\Dict\Lang;

class LangController extends Controller
{
/**
* Show the list of languages.
*
* @return \Illuminate\Http\Response
*/
public function index()
{

$langs = Lang::orderBy('name_en')->get();
$total_count = Lang::count();

return view('dict.lang.index')->with(array('languages' => $langs,
'total_count' => $total_count));
}
}
29 changes: 29 additions & 0 deletions app/Http/Controllers/HomeController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php

namespace App\Http\Controllers;

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

class HomeController 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('home');
}
}
6 changes: 6 additions & 0 deletions app/Http/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,9 @@
Route::get('/', function () {
return view('welcome');
});

Route::auth();

Route::get('/home', 'HomeController@index');

Route::get('dict/lang', 'Dict\LangController@index');
13 changes: 13 additions & 0 deletions app/Models/Dict/Lang.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace App\Models\Dict;

use Illuminate\Database\Eloquent\Model;

class Lang extends Model
{
//

public $timestamps = false;

}
Empty file modified bootstrap/cache/.gitignore
100644 → 100755
Empty file.
Loading

0 comments on commit 1af2725

Please sign in to comment.