@forelse($mataKuliah as $matkul)
<tr>
<td>{{ (( $mataKuliah->currentPage() - 1 ) * $mataKuliah->perPage() ) + $loop->iteration }}</td>
<td>{{ $matkul->kode_matkul }}</td>
<td>{{ $matkul->nama_matkul }}</td>
<td>{{ $matkul->sks }}</td>
<td>{{ $matkul->keahlian->nama_kk ?? null }}</td>
<td>{{ $matkul->tahunAkademik->periode_tahun ?? null }}</td>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* GLUT Shapes Demo | |
* | |
* Written by Nigel Stewart November 2003 | |
* | |
* This program is test harness for the sphere, cone | |
* and torus shapes in GLUT. | |
* | |
* Spinning wireframe and smooth shaded shapes are | |
* displayed until the ESC or q key is pressed. The |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function store(Request $request){ | |
//die('aaaaaaa'); | |
$result = $this->validate($request,[ | |
'full_name' => 'required', | |
'email' => 'required|unique:users', | |
'phone_number' => 'required', | |
'password' => 'required', | |
'role' => 'required', | |
]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//error_reporting(E_ERROR | E_PARSE); | |
include "dataset.php"; | |
$k = 10; | |
$data = $data; | |
// print_r($data); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var kata = "malam o"; | |
let hasil = ''; | |
for(let i=0;i<kata.length;i++){ | |
if(kata[i] == kata[kata.length - i - 1]){ | |
hasil = hasil.concat(kata[kata.length - i - 1]); | |
} | |
} | |
if(kata === hasil){ | |
console.log("palindrom"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@if (isset($paginator) && $paginator->lastPage() > 1) | |
<ul class="pagination"> | |
<?php | |
$interval = isset($interval) ? abs(intval($interval)) : 3 ; | |
$from = $paginator->currentPage() - $interval; | |
if($from < 1){ | |
$from = 1; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "# laravel-tes" >> README.md | |
git init | |
git add README.md | |
git commit -m "first commit" | |
git remote add origin https://github.com/fatkulnurk/laravel-tes.git | |
git push -u origin master |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$data = "[15042353453,845322424242]"; | |
$pattern = '/[^a-zA-Z0-9,]/'; | |
$replacement = ''; | |
$dataResult = preg_replace($pattern, $replacement, $data); | |
$dataResult = explode(',', $dataResult); |
##Windows users:
- Download wamp: http://www.wampserver.com/en/
- Download and extract cmder mini: https://github.com/cmderdev/cmder/releases/download/v1.1.4.1/cmder_mini.zip
- Update windows environment variable path to point to your php install folder (inside wamp installation dir) (here is how you can do this http://stackoverflow.com/questions/17727436/how-to-properly-set-php-environment-variable-to-run-commands-in-git-bash)
cmder will be refered as console
##Mac Os, Ubuntu and windows users continue here:
- Create a database locally named
homestead
utf8_general_ci
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In LoginController, Overide method username. | |
#Documentation | |
in input('login'); , change key with key name in your login form. | |
public function username() | |
{ | |
$login = request()->input('login'); | |
$fieldType = filter_var($login, FILTER_VALIDATE_EMAIL) ? 'email' : 'username'; |