nazar1987

developer at ministry of health iraq

Experience

6,645

0 Best Reply Awards

  • Member Since 4 Years Ago
  • 7 Lessons Completed
  • 0 Favorites

18th September, 2018

nazar1987 started a new conversation Add Item To Cache • 1 day ago

i have collect save in cache i want add new object to the collect is there solution ???

16th September, 2018

nazar1987 started a new conversation Mysqldump Is Not Recognized • 3 days ago

i try use laravel package to backup database when try backup this error appear use Artisa::call 'mysqldump' is not recognized as an internal or external command, operable program or batch file. i user windows and add mysql path in windows environment and when run the command in cmd work correctly

10th September, 2018

nazar1987 left a reply on Memory Usage • 1 week ago

@Thyrosis for example i show user login in your simple math 50000 request take 600KB is this right ?? how big web application work if you have more than 50000 request at same time ?

nazar1987 started a new conversation Memory Usage • 1 week ago

i used "barryvdh/laravel-debugbar" to check memory usage i found user take 12MB when login how many memory space if 50000 user login at same time ???

15th August, 2018

nazar1987 left a reply on Dynamic Config • 1 month ago

@crnkovic can send me link to how laravel wok or life cycle to load it in memory and what the part load in memory in each request ?

nazar1987 left a reply on Dynamic Config • 1 month ago

@newbie360 haha no i just try it in controller not user service provider i not know how config/*.php load I thought the config value load in cache . not load in every request

nazar1987 left a reply on Dynamic Config • 1 month ago

@crnkovic is there another solution because i think it not professional code to set all config in each request

nazar1987 left a reply on Dynamic Config • 1 month ago

@Cronix do you mean i must set config value in each request ?

nazar1987 left a reply on Dynamic Config • 1 month ago

in the config/app.php

    'timezone' => 'UTC';

and i try change it in controller function by

        config(['app.timezone' => 'America/Chicago']);
        echo config('app.timezone');

it echo America/Chicago but when try get value in another controller function by

    echo config('app.timezone');

it echo UTC

nazar1987 left a reply on Dynamic Config • 1 month ago

@tykus i try it in controller for just test to change timezone in runtime but when change timezone and try call another function the timezone return to default

nazar1987 left a reply on Dynamic Config • 1 month ago

@tykus i try

~config(['app.timezone' => 'America/Chicago']);~

it but the change not wok in whole i use laravel 5.4 and PHP 5.6 and work in localhost

nazar1987 left a reply on Dynamic Config • 1 month ago

my friend @crnkovic i try Config::set() but not work or not change in whole application

nazar1987 left a reply on Dynamic Config • 1 month ago

@crnkovic i try use set config but not work

nazar1987 started a new conversation Dynamic Config • 1 month ago

how can load dynamic config like debug or timezone or another config from database ?

13th August, 2018

nazar1987 left a reply on Dynamic NavBar • 1 month ago

In my mind professional solution it used low server resource and running faster and the code can used it in more place in application i hope you corrected my mind

nazar1987 left a reply on Manage Site Settings • 1 month ago

@tykus can give me professional solution ??

nazar1987 left a reply on Dynamic NavBar • 1 month ago

is this professional solution ???

nazar1987 left a reply on Dynamic NavBar • 1 month ago

@tykus i want store it in session to prevent the script generate navebar run in each page load

nazar1987 left a reply on Dynamic NavBar • 1 month ago

yes but what problem if i after generate the navbar store it in session ?? i want know what the professional code ?

nazar1987 left a reply on Dynamic NavBar • 1 month ago

i use laravel 5.4 that not support View Composer

nazar1987 started a new conversation Dynamic NavBar • 1 month ago

i have dynamic NavBar i generate it from database that dependence on user permission what the best solution to load it from database just at first time when user login and where can i save it in session or another place ??

nazar1987 started a new conversation Manage Site Settings • 1 month ago

i want example or package to manage site settings like site name or footer copyright or show hide part from web site and thanks for all

15th June, 2016

nazar1987 started a new conversation How Update First Selected Row By Quert Builder • 2 years ago

~ $data = DB::table('users') ->join('chat_messages', 'chat_messages.from_user_id', '=', 'users.id') ->select('chat_messages.id','users.first_name','users.second_name', 'users.last_name','chat_messages.message','chat_messages.from_user_id','chat_messages.to_user_id','chat_messages.read') ->where('chat_messages.from_user_id','=',1 ) ->where('chat_messages.to_user_id','=', 2 ) ->where('chat_messages.read','=', 0 ) ->first() ->update(array('read' => 1)); ~

14th January, 2016

nazar1987 left a reply on CPU And RAM Usage • 2 years ago

@ohffs thank you my friend but this function not work

Call to undefined function App\Http\Controllers\sys_getloadavg()

nazar1987 left a reply on CPU And RAM Usage • 2 years ago

@ohffs how can use sys_getloadavg() function in laravel ???

13th January, 2016

nazar1987 left a reply on CPU And RAM Usage • 2 years ago

@jekinney how can install this package in laravel ??

nazar1987 left a reply on CPU And RAM Usage • 2 years ago

@bashy yes i want server info

nazar1987 left a reply on CPU And RAM Usage • 2 years ago

@bashy No i want get info about the server not for process

nazar1987 started a new conversation CPU And RAM Usage • 2 years ago

how can get info about CPU and RAM Usage or how can use phpSysInfo in laravel ???

19th November, 2015

nazar1987 left a reply on Preventing Multiple Submits • 2 years ago

i have same problem :'(

8th October, 2015

nazar1987 left a reply on User Activity • 2 years ago

UP

nazar1987 left a reply on User Activity • 2 years ago

UP

nazar1987 left a reply on Ajax Post Request Not Returning Download Of PDF • 2 years ago

what you used to build PDF report ???

nazar1987 started a new conversation User Activity • 2 years ago

how register all user activity ( read,edit,delete,insert ) when login to logout

24th August, 2015

nazar1987 left a reply on Pagination With Union In Laravel • 3 years ago

@thomaskim yes use laravel 5.1 i want example

nazar1987 left a reply on Pagination With Union In Laravel • 3 years ago

what 's problem in my question ??

nazar1987 started a new conversation Pagination With Union In Laravel • 3 years ago

i have problem when try pagination tow union table

$page = Input::get('page', 1);
$paginate = 10;
 
$members = DB::table("members")
            ->select("id", "first_name", "last_name", "email", "created_at")
            ->where("site_id", $id);
$users = DB::table("users")
            ->select("id", "first_name", "last_name", "email", "created_at")
            ->where("site_id", $id)
            ->union($members)
            ->get();
 
$slice = array_slice($users, $paginate * ($page - 1), $paginate);
$data = Paginator::make($slice, count($users), $paginate);
 
return View::make('your_view_name',compact('data'));

this error appear

Class Illuminate\Support\Facades\Paginator does not exist

16th August, 2015

nazar1987 left a reply on Romanbican/roles Middleware • 3 years ago

this problem when user not have permission access

PermissionDeniedException in VerifyPermission.php line 42:
You don't have a required ['validateoffers'] permission.

nazar1987 left a reply on Romanbican/roles Middleware • 3 years ago

@romanbican can help me ?

nazar1987 started a new conversation Romanbican/roles Middleware • 3 years ago

hi every one i have problem in middleware i use in route

Route::get('post/{id}', ['middleware' => 'permission:needitems', function ($id) {
    echo "nazar";
}]);

and in Middleware

<?php

namespace App\Http\Middleware;

use Closure;

class PermissionMiddleware
{
    /**
     * Handle an incoming request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Closure  $next
     * @return mixed
     */
    public function handle($request, Closure $next, $permission)
    {
      $user = User::find(Auth::id());
      if (!$user->can($permission))
          return "Not Have Permission To Access";
      }

      return $next($request);
    }
}

9th August, 2015

nazar1987 started a new conversation Jasper Report • 3 years ago

hi every one i work with jasper report inside laravel it work correctly in localhost with windows 7 but when try it in godady hosting not work is there help

24th July, 2015

nazar1987 left a reply on Old Input For Update Form • 3 years ago

@rodrigo.pedra thank my friend

nazar1987 left a reply on Old Input For Update Form • 3 years ago

@RachidLaasri in the edit form must first i put the data from database

        <div class="form-group">
          <label for="n_code">National Code</label>
          <input type="text" name="n_code" class="form-control" value="{{ $ncode->n_code }}"/>
        </div>

and then how can keep old input ???

nazar1987 started a new conversation Old Input For Update Form • 3 years ago

hi every one how can i work with the old input in the update form

23rd July, 2015

nazar1987 left a reply on Jasper Report • 3 years ago

@Ruffles thank you very very much it work correctly

nazar1987 left a reply on Jasper Report • 3 years ago

i try it

Non-static method JasperPHP\JasperPHP::process() should not be called statically, assuming $this from incompatible context

nazar1987 left a reply on Jasper Report • 3 years ago

@Ruffles How can get the path

nazar1987 started a new conversation Jasper Report • 3 years ago

i have problem when call jasper report in laravel 5.1 this problem

Class 'App\Http\Controllers\JasperPHP' not found

15th July, 2015

nazar1987 left a reply on Query Builder Join • 3 years ago

My Work Stop

14th July, 2015

nazar1987 left a reply on Query Builder Join • 3 years ago

@frezno i found the problem the laravel take condition

->where('needitems.id' ,'=','tenderitems.needitem_id')

and binding it as parameter

  1 => array:3 [▼
    "query" => "select count(*) as aggregate from `tenderitems` inner join `tenders` on `tenders`.`id` = `tenderitems`.`tender_id` inner join `needs` on `needs`.`id` = `tenders`.`need_id` inner join `needitems` on `needitems`.`need_id` = `needs`.`id` inner join `ncodes` on `ncodes`.`id` = `needitems`.`ncode_id` where `needitems`.`id` = ? and `tenderitems`.`tender_id` = ?"
    "bindings" => array:2 [▼
      0 => "tenderitems.needitem_id"
      1 => "1"
    ]
    "time" => 1.0
  ]
Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.