shin1x1/laravel-table-admin

http://laravel.com/

http://kejyun.github.io/Laravel-4-Docum ... roduction/
回覆文章
yehlu
Site Admin
文章: 3245
註冊時間: 2004-04-15 17:20:21
來自: CodeCharge Support Engineer

shin1x1/laravel-table-admin

文章 yehlu »

http://packalyst.com/packages/package/s ... able-admin

代碼: 選擇全部

composer require "shin1x1/laravel-table-admin" "dev-master"
yehlu
Site Admin
文章: 3245
註冊時間: 2004-04-15 17:20:21
來自: CodeCharge Support Engineer

Re: laravel-table-admin

文章 yehlu »

-- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- 主機: localhost
-- 建立日期: 2014 年 12 月 19 日 17:53
-- 伺服器版本: 5.5.38-0ubuntu0.14.04.1
-- PHP 版本: 5.5.9-1ubuntu4.5

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";

--
-- 資料庫: `blog`
--

-- --------------------------------------------------------

--
-- 資料表結構 `classes`
--

CREATE TABLE IF NOT EXISTS `classes` (
`id` int(11) NOT NULL,
`name` varchar(20) NOT NULL,
UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- 資料表的匯出資料 `classes`
--

INSERT INTO `classes` (`id`, `name`) VALUES
(1, 'MotoGP'),
(2, 'Moto2'),
(3, 'Moto3');

-- --------------------------------------------------------

--
-- 資料表結構 `nationalities`
--

CREATE TABLE IF NOT EXISTS `nationalities` (
`id` int(11) NOT NULL,
`name` varchar(20) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- 資料表的匯出資料 `nationalities`
--

INSERT INTO `nationalities` (`id`, `name`) VALUES
(1, 'Spanish'),
(2, 'Italian');

-- --------------------------------------------------------

--
-- 資料表結構 `riders`
--

CREATE TABLE IF NOT EXISTS `riders` (
`id` int(11) NOT NULL,
`class_id` int(11) NOT NULL,
`nationality_id` int(11) NOT NULL,
`no` int(11) NOT NULL,
`name` varchar(20) NOT NULL,
`comment` varchar(20) NOT NULL,
PRIMARY KEY (`id`),
KEY `class_id` (`class_id`,`nationality_id`),
KEY `nationality_id` (`nationality_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- 資料表的匯出資料 `riders`
--

INSERT INTO `riders` (`id`, `class_id`, `nationality_id`, `no`, `name`, `comment`) VALUES
(1, 1, 1, 1, '1', '1');

--
-- 已匯出資料表的限制(Constraint)
--

--
-- 資料表的 Constraints `riders`
--
ALTER TABLE `riders`
ADD CONSTRAINT `riders_ibfk_2` FOREIGN KEY (`nationality_id`) REFERENCES `nationalities` (`id`),
ADD CONSTRAINT `riders_ibfk_1` FOREIGN KEY (`class_id`) REFERENCES `classes` (`id`);
yehlu
Site Admin
文章: 3245
註冊時間: 2004-04-15 17:20:21
來自: CodeCharge Support Engineer

Re: shin1x1/laravel-table-admin

文章 yehlu »

sudo a2enmod rewrite

sudo service apache2 restart

composer create-project laravel/laravel bni --prefer-dist 4.2

chmod 777 app/storage -fR


composer require "shin1x1/laravel-table-admin" "dev-master"

app/config/app.php
'debug' => true,
providers
'Shin1x1\LaravelTableAdmin\TableAdminServiceProvider',
aliases
'TableAdmin' => 'Shin1x1\LaravelTableAdmin\TableAdminFacade',

app/config/database.php

app/routes.php
TableAdmin::route([
'new_company',
]);

vi /etc/apache2/sites-enabled/000-default.conf

#bni
<VirtualHost 1.1.1.1:80>
DocumentRoot /var/www/example/public/
ServerName example.com.tw
TransferLog /var/log/apache2/example.log
<Directory /var/www/example/>
Options FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
</VirtualHost>

php artisan view:publish shin1x1/laravel-table-admin

app/views/packages/shin1x1/laravel-table-admin/index.blade.php

$ git config --global user.email "user@exmaple.com.tw"
$ git config --global user.name "User Name"

git init
git add .
git commit
回覆文章

回到「laravel」