{"id":1278,"date":"2016-12-28T15:20:01","date_gmt":"2016-12-28T15:20:01","guid":{"rendered":"http:\/\/myprojects.advchaweb.com\/?p=1278"},"modified":"2016-12-29T09:21:50","modified_gmt":"2016-12-29T09:21:50","slug":"sistem-informasi-sekolah-sis","status":"publish","type":"post","link":"https:\/\/myprojects.advchaweb.com\/index.php\/2016\/12\/28\/sistem-informasi-sekolah-sis\/","title":{"rendered":"Sistem Informasi Sekolah (SIS)"},"content":{"rendered":"<p>Source: https:\/\/github.com\/balitax\/SI-Sekolah-L5<\/p>\n<p>Installation: (the most steps is pretty same with <a href=\"http:\/\/myprojects.advchaweb.com\/index.php\/2016\/12\/27\/laravel-blog\/\" target=\"_blank\">Laravel Blog<\/a>)<\/p>\n<ol>\n<li>Create a new laravel project:\n<pre class=\"lang:default decode:true\">composer create-project --prefer-dist laravel\/laravel sis<\/pre>\n<p>&nbsp;<\/li>\n<li>Download the app from <a href=\"https:\/\/github.com\/balitax\/SI-Sekolah-L5\" target=\"_blank\">https:\/\/github.com\/balitax\/SI-Sekolah-L5<\/a>. It&#8217;s better to donwload in zip file then extract the content in \/works\/laravel\/sis\/ directory. Overwrite the existing files and directories.<\/li>\n<li>Install the laravel component required:\n<pre class=\"lang:default decode:true\">composer install<\/pre>\n<p>&nbsp;<\/li>\n<li>edit .env file and fill the database account (DB name is sis)<\/li>\n<li>Import the database file (database_sekolah.sql) along with the github.<br \/>\nNote: authentication scaffolding NOT RUN HERE! ERROR BUT NO PROBLEM<\/li>\n<li>Use &#8216;migration&#8217; to add some new tables into the new database\n<pre class=\"lang:default decode:true\">php artisan migrate<\/pre>\n<p>&nbsp;<\/li>\n<li>Dont forget to set the file permission in \/public\/ directory if we want to upload an image into it\n<pre class=\"lang:default decode:true\">teddy@teddy-K43SJ:~\/Documents\/works\/laravel\/sis$ sudo chmod -R 777 public\/<\/pre>\n<p>&nbsp;<\/li>\n<li>I found some errors when tried it for the first time. http:\/\/localhost:8000\/login IS WORKING but CAN&#8217;T LOGIN. THE USER TABLE IN &#8216;tbl_kepegawaian&#8217;. BECAUSE I DONT KNOW THE &#8216;admin&#8217; PASSWORD, I NEED TO UPDATE &#8216;password&#8217; FIELD WITH &#8216;$2y$10$eWW.aZOeruiS1VEO0ghKHu7A7UoQcj2tVmLIcnw6JnrcsiljuOmYK&#8217; &#8211;&gt; &#8216;satria&#8217;. SO the &#8216;admin&#8217; password is &#8216;satria&#8217;. NOW I CAN GO INTO THE ADMIN PAGE (dashboard, data sekolah, data siswa, galeri foto, absensi siswa, data pegawai, etc).<br \/>\nTHERE ARE SO MANY ERRORS (I CAN&#8217;T GO INTO THE WEBSITE ROOT OR http:\/\/localhost:8000\/ BUT ONLY CAN GO TO http:\/\/localhost:8000\/admin). ANYWAY IT&#8217;S GOOD AND I CAN SEE THE SCREEN!<br \/>\nNOTES: pls study the routes in \/app\/Http\/routes.php !<\/li>\n<\/ol>\n<p>SOMETHING IS NEEDED TO FIX SOME ERRORS:<\/p>\n<ol>\n<li>Error when I want to acces the root http:\/\/localhost:8000\/<br \/>\n&#8220;FatalErrorException in Handler.php line 25:<br \/>\nUncaught TypeError: Argument 1 passed to App\\Exceptions\\Handler::report() must be an instance of Exception, instance of Error given, called in \/home\/teddy\/Documents\/works\/laravel\/sis\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Bootstrap\/HandleExceptions.php on line 73 and defined in \/home\/teddy\/Documents\/works\/laravel\/sis\/app\/Exceptions\/Handler.php:25<br \/>\nStack trace:<br \/>\n#0 \/home\/teddy\/Documents\/works\/laravel\/sis\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Bootstrap\/HandleExceptions.php(73): App\\Exceptions\\Handler-&gt;report(Object(Error))<br \/>\n#1 [internal function]: Illuminate\\Foundation\\Bootstrap\\HandleExceptions-&gt;handleException(Object(Error))<br \/>\n#2 {main}<br \/>\nthrown&#8221;<br \/>\nSOLUTION: The error because I use PHP 7 (CLI) when I started the server (&#8216;php artisan serve&#8217;). ref: <a href=\"http:\/\/stackoverflow.com\/questions\/36983734\/laravel-fatalerrorexception-in-handler-php-line-25\">http:\/\/stackoverflow.com\/questions\/36983734\/laravel-fatalerrorexception-in-handler-php-line-25<\/a>. So use php 5.6 instead when starting the server like this:<\/p>\n<pre class=\"lang:default decode:true \">php5.6 artisan serve<\/pre>\n<\/li>\n<li>Another error when accessing the root website:<br \/>\n&#8220;FatalErrorException in FrontController.php line 42:<br \/>\nClass &#8216;App\\Models\\Banner&#8217; not found&#8221;<br \/>\nSOLUTION: In \/app\/Http\/Controllers\/FrontController.php, comment a few lines:<\/p>\n<pre class=\"lang:default decode:true \">\/\/$this-&gt;data['banner']           = Models\\Banner::where('id',1)-&gt;first();\r\n\/\/$this-&gt;data['link']             = Models\\Link::orderBy('id','desc')-&gt;limit(5)-&gt;get();\r\n\/\/$this-&gt;data['publikasi']        = Models\\Publikasi::orderBy('id','desc')-&gt;limit(3)-&gt;get();\r\n<\/pre>\n<p>Because there is models available for them.<br \/>\nAlso in &#8216;index&#8217; function, replace &#8216;bappeda&#8217; with &#8216;web&#8217;<\/p>\n<pre class=\"lang:default decode:true \">public function index() {\r\n    \/\/return view('bappeda.home', $this-&gt;data);\r\n    return view('web.home', $this-&gt;data);\r\n}<\/pre>\n<p>&nbsp;<\/li>\n<li>Now, the root\/front website can be displayed but the website can&#8217;t be loaded. User need to upload the logo manually from the admin page -&gt; Setting (http:\/\/localhost:8000\/admin\/setting). But when I saved the input, This error is appeared:<br \/>\n&#8220;QueryException in Connection.php line 624:<br \/>\nSQLSTATE[42S22]: Column not found: 1054 Unknown column &#8216;peta_latitude&#8217; in &#8216;field list&#8217; (SQL: update `tbl_setting` set `title_web` = Sekolah Ku, `desc_web` = Sekolah Ku, `key_web` = sekolah, `logo` = lapVa94436orMdu892YPf3uSj931XM.png, `facebook` = , `twitter` = , `gplus` = , `peta_latitude` = , `peta_longitude` = , `alamat` = , `no_telp` = , `no_fax` = , `email` = where `id_setting` = 1)&#8221;<br \/>\nSOLUTION: Modify tbl_setting in the database, then add these new fields: peta_latitude varchar(25), peta_longitude varchar(25), alamat text, no_telp varchar(25), no_fax varchar(25) and email varchar(25).<br \/>\nNow the website logo can be displayed<a href=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/12\/sis.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-1284\" src=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/12\/sis-875x1024.png\" alt=\"sis\" width=\"840\" height=\"983\" srcset=\"https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/12\/sis-875x1024.png 875w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/12\/sis-256x300.png 256w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/12\/sis-768x899.png 768w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/12\/sis-1200x1404.png 1200w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/12\/sis.png 1351w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a><\/li>\n<li>When I clicked one of the news (berita) like http:\/\/localhost:8000\/baca\/berita\/2011-lembaga-pemerintah-sudah-harus-cicipi-open-source, I got this error:<br \/>\n&#8220;InvalidArgumentException in FileViewFinder.php line 140:<br \/>\nView [bappeda.berita_detail] not found.&#8221;<br \/>\nSOLUTION: in \/app\/Http\/Controllers\/FrontController.php, Modify &#8216;berita&#8217; function and replace &#8216;bappeda&#8217; with &#8216;web&#8217; and &#8216;berita_detail&#8217; with &#8216;beritadetail&#8217;<\/p>\n<pre class=\"lang:default decode:true \">public function berita($slug) {\r\n    $berita_detail              = Models\\Berita::where('slug_berita',$slug)-&gt;first();\r\n    $this-&gt;data['title']        = $berita_detail-&gt;judul_berita;\r\n    $this-&gt;data['beritalist']   = $berita_detail;\r\n    $this-&gt;data['desc']         = substr($berita_detail-&gt;isi,0,200).'...';\r\n    $this-&gt;data['key']          = $berita_detail-&gt;judul_berita;\r\n    \/\/return view('bappeda.berita_detail', $this-&gt;data);\r\n    return view('web.beritadetail', $this-&gt;data);\r\n}<\/pre>\n<p>&nbsp;<\/li>\n<li>When I clicked one of the &#8216;Profil Sekolah&#8217; links like http:\/\/localhost:8000\/page\/profil-sekolah, I got this error:<br \/>\n&#8220;InvalidArgumentException in FileViewFinder.php line 140:<br \/>\nView [bappeda.halaman] not found.&#8221;<br \/>\nSOLUTION: SAME WITH ABOVE, Modify &#8216;halaman&#8217; function in FrontController.php and replace &#8216;bappeda&#8217; with &#8216;web&#8217;:<\/p>\n<pre class=\"lang:default decode:true \">public function halaman($slug) {\r\n    $detail_halaman         = Models\\Data::where('slug_data',$slug)-&gt;first();\r\n    $this-&gt;data['page']     = $detail_halaman;\r\n    $this-&gt;data['title']    = $detail_halaman-&gt;title;\r\n    $this-&gt;data['desc']     = strip_tags(substr($detail_halaman-&gt;content,0,200));\r\n    return view('web.halaman', $this-&gt;data);\r\n}<\/pre>\n<\/li>\n<li>Some links still shows error like for &#8216;pengumuman&#8217; (http:\/\/localhost:8000\/baca\/pengumuman\/pembagian-raport-semester-ganjil-tahun-ajaran-2010-2011) &#8211;&gt; check the route and make sure the model is exist<br \/>\nSOLUTION: There is no &#8216;pengumuman&#8217; route, so add them (also for pengumuman index and detail) in \/app\/Http\/routes.php like this:<\/p>\n<pre class=\"lang:default decode:true \">Route::get('\/pengumuman', 'FrontController@pengumumanlist');\r\nRoute::get('\/baca\/pengumuman\/{slug}', 'FrontController@pengumuman');<\/pre>\n<p>Then in FrontController.php, like above replace &#8216;bappeda&#8217; with &#8216;web&#8217; for &#8216;pengumumanlist&#8217; and &#8216;pengumuman&#8217; functions:<\/p>\n<pre class=\"lang:default decode:true \">public function pengumumanlist() {\r\n    ...\r\n    \/\/return view('bappeda.informasi', $this-&gt;data);\r\n    return view('web.pengumuman', $this-&gt;data);\r\n}\r\n\r\npublic function pengumuman($slug) {\r\n    ...\r\n    \/\/return view('bappeda.detail_informasi', $this-&gt;data);\r\n    return view('web.pengumuman_detail', $this-&gt;data);\r\n}<\/pre>\n<p>&nbsp;<\/li>\n<li>For Galleri menu, do this:\n<pre class=\"lang:default decode:true \">public function album() {\r\n    ...\r\n    return view('web.galeri', $this-&gt;data);\r\n}\r\n\r\npublic function foto($id) {\r\n    ...\r\n    return view('web.galeri_detail', $this-&gt;data);\r\n}<\/pre>\n<p>&nbsp;<\/li>\n<li>Some pages in the admin (http:\/\/localhost:8000\/admin) still can&#8217;t be showed up properly (some weirds characters appeared!)<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Source: https:\/\/github.com\/balitax\/SI-Sekolah-L5 Installation: (the most steps is pretty same with Laravel Blog) Create a new laravel project: composer create-project &#8211;prefer-dist laravel\/laravel sis &nbsp; Download the app from https:\/\/github.com\/balitax\/SI-Sekolah-L5. It&#8217;s better to donwload in zip file then extract the content in \/works\/laravel\/sis\/ directory. Overwrite the existing files and directories. Install the laravel component required: composer install &hellip; <a href=\"https:\/\/myprojects.advchaweb.com\/index.php\/2016\/12\/28\/sistem-informasi-sekolah-sis\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Sistem Informasi Sekolah (SIS)&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14,13],"tags":[],"class_list":["post-1278","post","type-post","status-publish","format-standard","hentry","category-laravel","category-tutorial"],"_links":{"self":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/1278","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/comments?post=1278"}],"version-history":[{"count":10,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/1278\/revisions"}],"predecessor-version":[{"id":1280,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/1278\/revisions\/1280"}],"wp:attachment":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/media?parent=1278"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/categories?post=1278"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/tags?post=1278"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}