• This repository has been archived on 25/Oct/2022
  • Stars
    star
    152
  • Rank 244,685 (Top 5 %)
  • Language
    JavaScript
  • Created over 10 years ago
  • Updated about 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Laravel 4.2 Bootstrap Admin Starter Template [with Oracle DB Support]

#Laravel 4 Bootstrap Admin Starter Template [with Oracle DB Support]

Laravel 4 Bootstrap Admin Starter Template is a sample application for beginning development with Laravel 4.

Features

  • Bootstrap 3.x
  • Custom Error Pages
    • 403 for forbidden page accesses
    • 404 for not found pages
    • 500 for internal server errors
  • Confide for Authentication and Authorization
  • Back-end
  • Front-end
    • Bootflat Flat UI KIT Template
    • User login, registration, forgot password
    • User account area
    • Simple Blog functionality
  • Supports Oracle Database
  • Packages included:

Issues

See github issue list for current list.

Recommendations

I recommend that you use Grunt to compile and minify your assets. See this article for details.

Also I recommend using Former for your forms. It's an excellent library.


##Requirements

PHP >= 5.4.0
MCrypt PHP Extension
PHP OCI8 Extension (For Oracle Users)

##How to install

Step 1: Get the code

Option 1: Git Clone

git clone https://github.com/yajra/laravel-admin-template.git laravel

Option 2: Download the repository

https://github.com/yajra/laravel-admin-template/archive/master.zip

Step 2: Use Composer to install dependencies

Option 1: Composer is not installed globally

cd laravel
curl -s http://getcomposer.org/installer | php
php composer.phar install --dev

Option 2: Composer is installed globally

cd laravel
composer install --dev

If you haven't already, you might want to make composer be installed globally for future ease of use.

Please note the use of the --dev flag.

Some packages used to preprocess and minify assests are required on the development environment.

When you deploy your project on a production environment you will want to upload the composer.lock file used on the development environment and only run php composer.phar install on the production server.

This will skip the development packages and ensure the version of the packages installed on the production server match those you developped on.

NEVER run php composer.phar update on your production server.

Step 3: Configure Environments

Open bootstrap/start.php and edit the following lines to match your settings. You want to be using your machine name in Windows and your hostname in OS X and Linux (type hostname in terminal). Using the machine name will allow the php artisan command to use the right configuration files as well.

$env = $app->detectEnvironment(array(

    'local' => array('your-local-machine-name'),
    'staging' => array('your-staging-machine-name'),
    'production' => array('your-production-machine-name'),

));

Now create the folder inside app/config that corresponds to the environment the code is deployed in. This will most likely be local when you first start a project.

You will now be copying the initial configuration file inside this folder before editing it. Let's start with app/config/app.php. So app/config/local/app.php will probably look something like this, as the rest of the configuration can be left to their defaults from the initial config file:

<?php

return array(

    'url' => 'http://myproject.local',

    'timezone' => 'UTC',

    'key' => 'YourSecretKey!!!',

    'providers' => array(

    [... Removed ...]

    /* Uncomment for use in development */
	//'Barryvdh\Debugbar\ServiceProvider', // Debugger
    ),

);

Step 4: Configure Database

Now that you have the environment configured, you need to create a database configuration for it. Copy the file app/config/database.php in app/config/local and edit it to match your local database settings. You can remove all the parts that you have not changed as this configuration file will be loaded over the initial one.

Step 5: Configure Mailer

In the same fashion, copy the app/config/mail.php configuration file in app/config/local/mail.php. Now set the address and name from the from array in config/mail.php. Those will be used to send account confirmation and password reset emails to the users. If you don't set that registration will fail because it cannot send the confirmation email.

Step 6: Populate Database

Run these commands to create and populate Users table:

php artisan migrate
php artisan db:seed

Step 7: Set Encryption Key

In app/config/app.php

/*
|--------------------------------------------------------------------------
| Encryption Key
|--------------------------------------------------------------------------
|
| This key is used by the Illuminate encrypter service and should be set
| to a random, long string, otherwise these encrypted values will not
| be safe. Make sure to change it before deploying any application!
|
*/
'key' => 'YourSecretKey!!!',

You can use artisan to do this

php artisan key:generate --env=local

The --env option allows defining which environment you would like to apply the key generation. In our case, artisan generates your key in app/config/local/app.php and leaves 'YourSecretKey!!!' in app/config/app.php. Now it can be generated again when you move the project to another environment.

Step 8: Make sure app/storage is writable by your web server.

If permissions are set correctly:

chmod -R 775 app/storage

Should work, if not try

chmod -R 777 app/storage

Step 9: Start Page (Three options for proceeding)

User login with commenting permission

Navigate to your Laravel 4 website and login at /user/login:

username : user
password : user

Create a new user

Create a new user at /user/create

Admin login

Navigate to /admin

username: admin
password: admin

Application Structure

The structure of this starter site is the same as default Laravel 4 with one exception. This starter site adds a library folder. Which, houses application specific library files. The files within library could also be handled within a composer package, but is included here as an example.

Detect Language

If you want to detect teh language on all pages you'll want to add the following to your routes.php at the top.

Route::when('*','detectLang');

Development

For ease of development you'll want to enable a couple useful packages. This requires editing the app/config/app.php file.

    'providers' => array(

        [...]

        /* Uncomment for use in development */
		// 'Barryvdh\Debugbar\ServiceProvider',
    ),

Uncomment the Generators and IDE Helpers. Then you'll want to run a composer update with the dev flag.

php composer.phar update

This adds the generators and ide helpers. To make it build the ide helpers automatically you'll want to modify the post-update-cmd in composer.json

		"post-update-cmd": [
			"php artisan ide-helper:generate",
			"php artisan optimize"
		]

Production Launch

By default debugging is enabled. Before you go to production you should disable debugging in app/config/app.php

    /*
    |--------------------------------------------------------------------------
    | Application Debug Mode
    |--------------------------------------------------------------------------
    |
    | When your application is in debug mode, detailed error messages with
    | stack traces will be shown on every error that occurs within your
    | application. If disabled, a simple generic error page is shown.
    |
    */

    'debug' => false,

Troubleshooting

Composer asking for login / password

Try using this with doing the install instead.

composer install --dev --prefer-source --no-interaction

License

This is free software distributed under the terms of the MIT license

Additional information

Inspired by and based on Laravel-4-Bootstrap-Starter-Site

Any questions, feel free to contact me.

More Repositories

1

laravel-datatables

jQuery DataTables API for Laravel
PHP
4,740
star
2

laravel-oci8

Oracle DB driver for Laravel via OCI8
PHP
829
star
3

laravel-datatables-html

Laravel DataTables HTML Builder Plugin
PHP
272
star
4

laravel-datatables-buttons

Laravel DataTables Buttons Plugin
PHP
252
star
5

laravel-auditable

Basic Auditable package for Eloquent Model.
PHP
149
star
6

laravel-datatables-demo

Laravel Datatables Package Demo App
HTML
146
star
7

laravel-datatables-editor

Laravel DataTables Editor Integration.
PHP
115
star
8

laravel-acl

Laravel ACL is a simple role, permission ACL for Laravel Framework.
PHP
107
star
9

datatables

A package that installs the complete Laravel DataTables core & plugins.
PHP
96
star
10

laravel-datatables-fractal

Laravel DataTables Fractal Plugin.
PHP
95
star
11

laravel-datatables-docs

Laravel DaTatables package documentation
92
star
12

pdo-via-oci8

PHP PDO_OCI functions via OCI8 extension
PHP
88
star
13

laravel-disqus

A simple Disqus platform integration with Laravel.
PHP
84
star
14

laravel-address

Philippines Regions, Provinces, Cities and Barangays Address Lookup API for Laravel.
PHP
33
star
15

homestead-oracle

Laravel local development environment with Oracle XE 11g
Shell
31
star
16

laravel-datatables-export

Laravel DataTables Export plugin that uses queue, spout and livewire for bulk data export.
PHP
29
star
17

dt54

Laravel 5.4 DataTables Demo Application
PHP
24
star
18

laravel-datatables-vite

Laravel DataTables with Vite
JavaScript
20
star
19

cms-core

YajraCMS Core Module
PHP
19
star
20

zillow

A simple Laravel Wrapper for the Zillow API services.
PHP
15
star
21

laravel-datatables-scout

Laravel DataTables plugin to support Laravel Scout.
PHP
12
star
22

laravel-datatables-assets

A personal collection of DataTables server-side and client-side scripts.
JavaScript
10
star
23

laravel-datatables-ui

Laravel DataTables UI Preset
PHP
10
star
24

laravel-sql-loader

Oracle SQL*Loader for Laravel
PHP
9
star
25

yajrabox.com

Source code of yajrabox.com website.
PHP
7
star
26

laravel-4.1-starter-kit

Laravel 4.1 Starter Kit with Oracle DB Support
PHP
7
star
27

cms-themes

YajraCMS Themes Module
PHP
7
star
28

laravel-breadcrumbs

A simple Laravel style way to create breadcrumbs
PHP
6
star
29

laravel-datatables-tailwind-experiment

Blade
6
star
30

laravel-auditable-docs

Laravel Auditable Package Docs
5
star
31

laravel-oci8-docs

Laravel OCI8 package documentation
5
star
32

laravel-datatables-starter

Laravel 5.5 and DataTables starter kit.
PHP
5
star
33

laravel-acl-docs

Laravel ACL Docs
4
star
34

laravel-datatables-inertia

Laravel InertiaJS with DataTables
4
star
35

clean-blog

A clean blog theme for YajraCMS.
HTML
3
star
36

analytics-module

YajraCMS Google Analytics Module
HTML
2
star
37

yajra.github.io

HTML
1
star
38

laravel-datatables-compatibility

Laravel DataTables v8 plugin for v7 backward compatibility.
PHP
1
star
39

dt-searchpanes-demo

Laravel DataTables Server-Side searchPane demo
PHP
1
star
40

datatables.net-tailwindcss

jQuery DataTables using TailwindCSS with Editor support.
1
star