 |
FREE !! LARAVEL CRUD "Intranet" สำหรับใช้ในองกรณ์ (ขนาดเล็ก) |
|
 |
|
|
 |
 |
|
License เป็นแบบไหนครับ
|
 |
 |
 |
 |
Date :
2017-01-11 16:52:35 |
By :
mr.win |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
เดียวแชร์ให้นะครับ รอคิวอยู่ครับ 
|
 |
 |
 |
 |
Date :
2017-01-12 09:06:58 |
By :
mr.win |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ต้องแก้ไขเพิ่มเติมในส่วนไหนบ้างครับผม ผมลองโหลดมาแล้ว แต่ล็อคอินไม่ผ่าน อะครับ
|
 |
 |
 |
 |
Date :
2017-01-20 22:14:34 |
By :
พลพล |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
กำลังหาแบบนี้อยู่พอดีเลยครับ ผมติดปัญหาคือ เข้าไปแก้ไขไฟล์ ชื่อ database ใน folder configแล้ว เปลี่ยน username และ passwordแล้วครับ แต่ติดตรงมีเลขport ด้วยครับ อยากรู้ว่าแก้ไขส่วนไหนเพิ่มเติม รบกวน จขกท ด้วยนะครับ ขอบคุณมากครับ
ปล. ใช้xampp 7.0.13
|
 |
 |
 |
 |
Date :
2017-01-23 14:18:40 |
By :
skyclick |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ตอบความคิดเห็นที่ : 7 เขียนโดย : skyclick เมื่อวันที่ 2017-01-26 14:14:09
รายละเอียดของการตอบ ::
แนะนำวิธีการติดตั้ง และ import DB อย่างง่ายๆละกันนะครับ
• Download XAMPP V.7.0.13 / PHP 7.0.13 มาติดตั้ง
https://www.apachefriends.org/download.html
• ติดตั้ง Composer path file php.exe ที่เราติดตั้งภายในเครื่อง ยกตัวอย่าง C:\xampp\php\php.exe
https://getcomposer.org/
• เปิด XAMPP Control Panel และ Run Apache,MySQL
• Extract File Intranet ที่เราได้ทำการ Download ไว้ ไว้ใน path C:\xampp\htdocs\intranet
• Run cmd พิมพ์ cd xampp\htdocs\intranet
• พิมพ์ php artisan serv เปิด Server โหมดจำลองของ Laravel จะได้
http://localhost:8000/
• เข้าไปที่ C:\xampp\htdocs\intranet\.env และ Setting
Code (PHP)
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=intranet
DB_USERNAME=root
DB_PASSWORD=
• เข้าไปที่ http://localhost/phpmyadmin/ และ สร้าง DB ที่ชื่อว่า intranet
• Import SQL C:\xampp\htdocs\intranet\SQL\intranet.sql เข้าไปใน DB intranet
• เข้าสู่ Browser พิมพ์ http://localhost:8000 เพื่อเข้าสู่หน้า intranet จะติดอยู่ที่หน้า login
สำหรับ Guest
Email : [email protected]
Password : 1234
สำหรับ Admin
Email : [email protected]
Password : admin
ปล. ขอให้สนุกครับ 
|
ประวัติการแก้ไข 2017-01-27 10:07:07
 |
 |
 |
 |
Date :
2017-01-27 10:06:42 |
By :
dudesaranyu |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
อ้าว ไปๆ มาๆ ไหงกลายเป็น import db ไปแล้ว
ทำไมไม่สอนใช้ migration + seed ล่ะ
command line ไม่น่ากลัวหรอก เพราะเขียน laravel ได้ใช้แน่
ไม่เฉพาะ php artisan หรอก
ืcomposer, npm, bower, gulp มาเป็นพรวนแน่ๆ
|
 |
 |
 |
 |
Date :
2017-01-30 16:39:26 |
By :
ห้ามตอบเกินวันละ 2 กระทู้ |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|

|
 |
 |
 |
 |
Date :
2017-01-31 10:44:45 |
By :
mr.win |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|

เข้าได้แล้วครับ ว่าแต่ มีไฟล์database อยู่2file ต้องใช้ทั้ง2หรือเปล่าครับ
และการเพิ่ม ส่วนของ carousels (+Create carousels) เพิ่มไม่ได้เป็นเพราะอะไรครับ
และขอบคุณมากนะครับ ที่นำมาแบ่งปัน
|
 |
 |
 |
 |
Date :
2017-02-01 19:17:51 |
By :
skyclick |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ตอบความคิดเห็นที่ : 12 เขียนโดย : skyclick เมื่อวันที่ 2017-02-01 19:17:51
รายละเอียดของการตอบ ::
เข้าไปที่ Path intranet/resources/views/carousels/_form.blade.php
แก้ไขเป็น
Code (PHP)
@if(!empty($carousel->background))
<section id="main-slider" class="no-margin" >
<div class="carousel slide">
<div class="carousel-inner">
<div class="item active" style="background-image: url({{ url($carousel->background) }})">
<div class="container">
<div class="row slide-margin">
<div class="col-sm-6">
<div class="carousel-content">
<h1 class="animation animated-item-1">{{ $carousel->title }}</h1>
<h2 class="animation animated-item-2">{{ $carousel->preface }}</h2>
<a class="btn-slide animation animated-item-3" href="{{ url($carousel->link) }}">Read More</a>
</div>
</div>
<div class="col-sm-6 hidden-xs animation animated-item-4">
<div class="slider-img">
<img src="{{ url($carousel->image) }}" class="img-responsive">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
@endif
<div class="form-group">
{!! Form::label('Title','Title*') !!}
{!! Form::text('title',null,['class'=>'form-control']) !!}
</div>
<div class="form-group">
{!! Form::label('Preface','Preface*') !!}
{!! Form::text('preface',null,['class'=>'form-control']) !!}
</div>
<div class="form-group">
{!! Form::label('background','Background*') !!}
{!! Form::file('background',null,['class'=>'form-control']) !!}
</div>
<div class="form-group">
{!! Form::label('image','Image*') !!}
{!! Form::file('image',null,['class'=>'form-control']) !!}
</div>
<div class="form-group">
{!! Form::label('Featured','Featured') !!}
{!! Form::select('featured',['0'=>'Off','1'=>'On'],null,['class'=>'form-control']) !!}
</div>
<div class="form-group">
{!! Form::label('Link','Link') !!}
{!! Form::text('link',null,['class'=>'form-control']) !!}
</div>
<div class="form-group">
{!! Form::label('Created At','Created At') !!}
{!! Form::input('datetime','created_at',null,['class'=>'form-control','disabled']) !!}
</div>
<div class="form-group">
{!! Form::label('Updated At','Updated At') !!}
{!! Form::input('datetime','updated_at',null,['class'=>'form-control','disabled']) !!}
</div>
{!! Form::button($textButton,['class'=>'btn btn-danger form-control','type'=>'submit']) !!}
|
ประวัติการแก้ไข 2017-02-02 09:46:52
 |
 |
 |
 |
Date :
2017-02-02 09:46:10 |
By :
dudesaranyu |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
UPDATE
สำหรับท่านที่ต้องการ Create migration + seed ผ่าน command line แนะนำให้โหลดตาม Link ด้านล่างนี้ครับ
http://www.filedropper.com/intranet_1
วิธีการติดตั้ง
• Download XAMPP V.7.0.13 / PHP 7.0.13 มาติดตั้ง
https://www.apachefriends.org/download.html
• ติดตั้ง Composer path file php.exe ที่เราติดตั้งภายในเครื่อง ยกตัวอย่าง C:\xampp\php\php.exe
https://getcomposer.org/
• เปิด XAMPP Control Panel และ Run Apache,MySQL
• Extract File Intranet ที่เราได้ทำการ Download ไว้ ไว้ใน path C:\xampp\htdocs\intranet
• Run cmd พิมพ์ cd xampp\htdocs\intranet
• พิมพ์ php artisan serv เปิด Server โหมดจำลองของ Laravel จะได้
http://localhost:8000/
• เข้าไปที่ C:\xampp\htdocs\intranet\.env และ Setting
Code (PHP)
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=intranet
DB_USERNAME=root
DB_PASSWORD=
• เข้าไปที่ http://localhost/phpmyadmin/ และ สร้าง DB ที่ชื่อว่า intranet
• Run cmd พิมพ์ php artisan migration
• พิมพ์ php artisan db:seed
• เข้าสู่ Browser พิมพ์ http://localhost:8000 เพื่อเข้าสู่หน้า intranet จะติดอยู่ที่หน้า login
สำหรับ Guest
Email : [email protected]
Password : 1234
สำหรับ Admin
Email : [email protected]
Password : admin
|
ประวัติการแก้ไข 2017-02-02 10:07:17
 |
 |
 |
 |
Date :
2017-02-02 10:06:37 |
By :
dudesaranyu |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|

ได้แล้วครับ ขอบคุณมากๆครับ
|
 |
 |
 |
 |
Date :
2017-02-02 15:48:13 |
By :
skyclick |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอถามอีกนิดครับ ถ้า userทั่วไปเข้าชม ไม่ต้องมีหน้าlogin ทำอย่างไรครับ เข้าชมได้เลยเช่นhttp://localhost/intranet/public/ ชมเว็บได้เลย
จะให้เข้าloginเฉพาะ ส่วนadmin หรือ http://localhost/intranet/public/administrator
รบกวนด้วยครับ ขอบคุณครับ
|
 |
 |
 |
 |
Date :
2017-02-06 16:38:57 |
By :
skyclick |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ตอบความคิดเห็นที่ : 23 เขียนโดย : skyclick เมื่อวันที่ 2017-02-07 08:55:42
รายละเอียดของการตอบ ::
1. ในส่วนของuser กล่ม guest ไม่ต้องไปหน้า login ทำอย่างไรครับ
- Middleware = ตัว filter ไปอ่านมาก่อน ไม่เข้าใจตรงไหนถาม
2. อยากให้เข้าหน้าเว็บได้ตั้งแต่พิมพ์ http://localhost/intranet/public/ ถ้าแก้ไขได้แจ้งด้วยนะครับ ขอบคุณมากๆครับ
- เย้ย!!! ใช้ laravel ไม่เคยให้อ้างถึง public เลยนะ เรียก js, css ยังใช้แค่ {{ Html::style(elixir('css/bootstrap.css')) }} เลย
เรียก web ก็แค่ www.myweb.dev โดย route และ auth แบบ
www.myweb.dev -> เข้าเว็บก่อน -> login user -> ไป profile
admin.myweb.dev -> login admin -> ไป dash board
ทั้งหมดนี่ใช้ Middleware + Route::domain เท่านั้น (แยกด้วย domain คือ www ใช้ users table ส่วน admin ใช้ admin table)
อย่างจะทำ auth ด้วย 2 table (user/admin) แบบนี้ก็ต้องไปเพิ่ม config/auth.php ตามนี้
Code (PHP)
<?php
return [
/*
|--------------------------------------------------------------------------
| Authentication Defaults
|--------------------------------------------------------------------------
|
| This option controls the default authentication "guard" and password
| reset options for your application. You may change these defaults
| as required, but they're a perfect start for most applications.
|
*/
'defaults' => [
'guard' => 'users',
'passwords' => 'users',
],
/*
|--------------------------------------------------------------------------
| Authentication Guards
|--------------------------------------------------------------------------
|
| Next, you may define every authentication guard for your application.
| Of course, a great default configuration has been defined for you
| here which uses session storage and the Eloquent user provider.
|
| All authentication drivers have a user provider. This defines how the
| users are actually retrieved out of your database or other storage
| mechanisms used by this application to persist your user's data.
|
| Supported: "session", "token"
|
*/
'guards' => [
'users' => [
'driver' => 'session',
'provider' => 'users',
],
'admins' => [
'driver' => 'session',
'provider' => 'admins',
],
'api' => [
'driver' => 'token',
'provider' => 'users',
],
],
/*
|--------------------------------------------------------------------------
| User Providers
|--------------------------------------------------------------------------
|
| All authentication drivers have a user provider. This defines how the
| users are actually retrieved out of your database or other storage
| mechanisms used by this application to persist your user's data.
|
| If you have multiple user tables or models you may configure multiple
| sources which represent each model / table. These sources may then
| be assigned to any extra authentication guards you have defined.
|
| Supported: "database", "eloquent"
|
*/
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => App\User::class,
],
'admins' => [
'driver' => 'eloquent',
'model' => App\Administrator::class,
],
// 'users' => [
// 'driver' => 'database',
// 'table' => 'users',
// ],
],
/*
|--------------------------------------------------------------------------
| Resetting Passwords
|--------------------------------------------------------------------------
|
| Here you may set the options for resetting passwords including the view
| that is your password reset e-mail. You may also set the name of the
| table that maintains all of the reset tokens for your application.
|
| You may specify multiple password reset configurations if you have more
| than one user table or model in the application and you want to have
| separate password reset settings based on the specific user types.
|
| The expire time is the number of minutes that the reset token should be
| considered valid. This security feature keeps tokens short-lived so
| they have less time to be guessed. You may change this as needed.
|
*/
'passwords' => [
'users' => [
'provider' => 'users',
'email' => 'website.emails.reset',
'table' => 'password_resets',
'expire' => 60,
],
],
];
|
 |
 |
 |
 |
Date :
2017-02-08 09:57:03 |
By :
ห้ามตอบเกินวันละ 2 กระทู้ |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ถ้าจะถามว่า middleware ทำหน้าที่อย่างไร ก็ดูจากโค้ด
Code (PHP)
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Support\Facades\Auth;
class Authenticate
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param string|null $guard
* @return mixed
*/
public function handle($request, Closure $next, $guard = null)
{
if (Auth::guard($guard)->guest()) { // ถ้าเป็น quest อยู่
if ($request->ajax() || $request->wantsJson()) {
return response('Unauthorized.', 401);
} else {
return redirect()->guest('/auth/login');
}
}
elseif ($guard == 'admins') { // ถ้า user เข้าไปในส่วน admin
if (Auth::guard('users')->check()) {
return redirect()->route('admin.unauthorize');
}
}
elseif ($guard == 'users') { // ถ้า admin เข้าไปในส่วน user
if (Auth::guard('admins')->check()) {
return redirect()->route('website.member.admin');
}
}
return $next($request);
}
}
คือถ้าเข้าไปในหน้าส่วนที่ตัวเองไม่มีสิทธิ์ ก็โดน middleware ถีบกระเด็นออกมา
|
 |
 |
 |
 |
Date :
2017-02-08 10:08:56 |
By :
ห้ามตอบเกินวันละ 2 กระทู้ |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอถามอีกนิดนึงครับ ผมแก้ไขเว็บนี้ได้ทั้งหมดแล้ว เปลี่ยนอื่นๆได้แล้ว จะอัพขึ้นโฮสจริงที่เช่าไว้ครับ ผ่านโปรแกรม FZL
ผมงงตรง ลิงค์ที่ตั้งระยะไกลผมจะเอาลิค์ไปวางหัวข้อตรงไหนครับ ในไฟล์.env ไหมครับ เจอแต่ช่อง database username password
|
ประวัติการแก้ไข 2017-02-10 19:53:58 2017-02-13 11:44:37
 |
 |
 |
 |
Date :
2017-02-10 19:52:00 |
By :
skyclick |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
laravel ไม่เหมาะกับ shared host นะ
ก็ใช้ได้แหละ แต่ไม่รู้จะรัน command จากตรงไหน
แนะนำเป็น vps จะดีกว่า
|
 |
 |
 |
 |
Date :
2017-02-14 11:24:34 |
By :
ห้ามตอบเกินวันละ 2 กระทู้ |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
โหลดไม่ได้แล้วครับ รบกวนเช็คลิ้งค์ให้หน่อยครับ
|
 |
 |
 |
 |
Date :
2017-04-17 10:34:22 |
By :
Phoom |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
downloadไม่ได้แล้วครับ
|
 |
 |
 |
 |
Date :
2017-08-25 17:45:25 |
By :
ขอด้วยครับ |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
รบกวนอัพใหม่ได้ไหมครับ ดาวโหลดไม่ได้แล้ว
|
 |
 |
 |
 |
Date :
2018-12-21 15:51:55 |
By :
boy |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
download ไม่ได้แล้วครับ รบกวนใหม่ด้วยครบ
|
 |
 |
 |
 |
Date :
2019-09-04 08:48:24 |
By :
2267496246628223 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|